Summary: | Diagnostic about wrong use _Complex prints __complex__ | ||
---|---|---|---|
Product: | gcc | Reporter: | Steven Bosscher <steven> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, jsm28, manu |
Priority: | P3 | Keywords: | diagnostic, patch |
Version: | 4.2.0 | ||
Target Milestone: | --- | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00874.html | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2008-08-14 13:07:48 | |
Bug Depends on: | 14875 | ||
Bug Blocks: |
Description
Steven Bosscher
2006-06-24 14:01:14 UTC
Confirmed, we don't record in the preprocessor which keyword is used, _Complex is treated the same as __complex__. There is another bug about a similar issue with "or" and |. Subject: Re: Diagnostic about wrong use _Complex prints __complex__ "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes: | Confirmed, we don't record in the preprocessor which keyword is | used, _Complex is treated the same as __complex__. Indeed. However, we can approximate a fix by testing whether we're compiling under C99, GNU99, or just C90, or C++. -- gaby (In reply to comment #3) > Indeed. However, we can approximate a fix by testing whether we're > compiling under C99, GNU99, or just C90, or C++. That would not work as _Complex is accepted in GNU90 more and with the C++ front-end by default. In fact "_Complex float t;" is accepted with the C++ front-end even with -pedantic which seems wrong and that would be a different but. Subject: Re: Diagnostic about wrong use _Complex prints __complex__ "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes: | (In reply to comment #3) | > Indeed. However, we can approximate a fix by testing whether we're | > compiling under C99, GNU99, or just C90, or C++. | | That would not work as _Complex is accepted in GNU90 more and with the C++ | front-end by default. Lookup the meaning of "approximation". -- Gaby Subject: Bug 28152 Author: manu Date: Thu Aug 14 13:01:58 2008 New Revision: 139097 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139097 Log: 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c/28152 * c-parser.c (c_lex_one_token): Do not store the canonical spelling for keywords. testsuite/ * gcc.dg/parser-pr28152.c: New. * gcc.dg/parser-pr28152-2.c: New. Added: trunk/gcc/testsuite/gcc.dg/parser-pr28152-2.c trunk/gcc/testsuite/gcc.dg/parser-pr28152.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-parser.c trunk/gcc/testsuite/ChangeLog This is FIXED for C but not for C++. Probably this is the same bug as 14875 but just in case, I keep open both. Subject: Bug 28152 Author: manu Date: Mon May 4 12:47:53 2009 New Revision: 147097 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147097 Log: 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/28152 cp/ * parser.c (cp_lexer_get_preprocessor_token): Do not store the canonical spelling for keywords. (cp_parser_attribute_list): Use the canonical spelling for keywords in attributes. testsuite/ * g++.dg/parse/parser-pr28152.C: New. * g++.dg/parse/parser-pr28152-2.C: New. Added: trunk/gcc/testsuite/g++.dg/parse/parser-pr28152-2.C trunk/gcc/testsuite/g++.dg/parse/parser-pr28152.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog FIXED in GCC 4.5 |