This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/61006] libcpp/lex.c: must use 'enum' tag to refer to type "raw_str_phase"
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Apr 2014 20:20:19 +0000
- Subject: [Bug bootstrap/61006] libcpp/lex.c: must use 'enum' tag to refer to type "raw_str_phase"
- Auto-submitted: auto-generated
- References: <bug-61006-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61006
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to spamcop from comment #2)
> Okay, but looking at the rest of the code, this seems to be the only
> enum/struct/union that is not correctly "typed" according to C rules. E.g.
> all the other variables of enum type have `enum` in the variable declaration
> and if I just fix this one line, the file compiles as standard C without any
> problem. So if nothing else than this line is a at least a serve break of
> style compared to the rest of the file and as far as I can tell the only
> reason why this file is not standard C and would need a C++ compiler.
The code was originally written as C code and then moved over to C++ in 4.8;
except it was not converted, just compiled as C++ code. Now C++ism are being
placed in the code which is why you see the difference here.