This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++ 2.7.2.3 says «Unterminated string» ininline function containing terminated string with letters above 127d


On Sun, 26 Mar 2000, Martin v. Loewis wrote:

> Thanks for your bug report. gcc-2.95.2 indeed accepts your program.
> Please note that it is not strictly portable C++ code, since only
> ASCII is allowed here. g++ accepts that as an extension.
I find it strange that characters with the high bit set is accepted
(as an extension) in ordinary (outline) functions and not in inline
functions. I see no difference in that respect.

I also discovered another possible bug. I may be abusing the C++
language, but I think it is a bug either way:

class c {
  const int MinValue = -100;
  const int MaxValue = +200;
};

Compiled with gcc -Wall -c, gcc says:
morebugs.cc:3: field initializer is not constant

If I remove the (redundant) + before 200, the code compiles OK.
200 is the same as +200, and in my opinion so should the compiler
think.

----------------------------------------------------------------------
Trond Endrestøl                          |             trond@gtf.ol.no
Merkantilvegen 59HB7,                    |    trond@ramstind.gtf.ol.no
N-2815 GJØVIK, NORWAY                    |+47 61139424 || +47 63874242
Patron of The Art of Computer Programming|     FreeBSD 3.4 & Pine 4.21


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]