public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28152]  New: Diagnostic about wrong use _Complex prints __complex__
@ 2006-06-24 14:14 steven at gcc dot gnu dot org
  2006-06-28 21:21 ` [Bug c/28152] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-06-24 14:14 UTC (permalink / raw)
  To: gcc-bugs

$ cat t.c
int
main (void)
{
  _Complex float z;

  z = _Complex (1.90000007326203904e+19, 0.0);
  z = _Complex (1.0e+0, 0.0) / z;
$ ./cc1 -quiet t.c
t.c: In function 'main':
t.c:6: error: expected expression before '__complex__'
t.c:7: error: expected expression before '__complex__'
$ ./cc1 --version
GNU C version 4.2.0 20060624 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.0.2 20050901 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
$


-- 
           Summary: Diagnostic about wrong use _Complex prints __complex__
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
@ 2006-06-28 21:21 ` pinskia at gcc dot gnu dot org
  2006-06-28 22:00 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-28 21:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-06-28 21:18 -------
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 |.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-06-28 21:18:44
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
  2006-06-28 21:21 ` [Bug c/28152] " pinskia at gcc dot gnu dot org
@ 2006-06-28 22:00 ` pinskia at gcc dot gnu dot org
  2006-07-02 16:03 ` gdr at integrable-solutions dot net
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-28 22:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-06-28 21:21 -------
PR 14875 is the related bug.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |14875


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
  2006-06-28 21:21 ` [Bug c/28152] " pinskia at gcc dot gnu dot org
  2006-06-28 22:00 ` pinskia at gcc dot gnu dot org
@ 2006-07-02 16:03 ` gdr at integrable-solutions dot net
  2006-07-02 16:11 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gdr at integrable-solutions dot net @ 2006-07-02 16:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from gdr at integrable-solutions dot net  2006-07-02 16:03 -------
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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-07-02 16:03 ` gdr at integrable-solutions dot net
@ 2006-07-02 16:11 ` pinskia at gcc dot gnu dot org
  2006-07-02 16:37 ` gdr at integrable-solutions dot net
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-02 16:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-07-02 16:11 -------
(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.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-07-02 16:11 ` pinskia at gcc dot gnu dot org
@ 2006-07-02 16:37 ` gdr at integrable-solutions dot net
  2008-08-14 13:04 ` manu at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gdr at integrable-solutions dot net @ 2006-07-02 16:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from gdr at integrable-solutions dot net  2006-07-02 16:37 -------
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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-07-02 16:37 ` gdr at integrable-solutions dot net
@ 2008-08-14 13:04 ` manu at gcc dot gnu dot org
  2008-08-14 13:09 ` [Bug c++/28152] " manu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-14 13:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from manu at gcc dot gnu dot org  2008-08-14 13:03 -------
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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-08-14 13:04 ` manu at gcc dot gnu dot org
@ 2008-08-14 13:09 ` manu at gcc dot gnu dot org
  2009-02-07 20:54 ` manu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-14 13:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from manu at gcc dot gnu dot org  2008-08-14 13:07 -------
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.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |c++
   Last reconfirmed|2006-06-28 21:18:44         |2008-08-14 13:07:48
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-08-14 13:09 ` [Bug c++/28152] " manu at gcc dot gnu dot org
@ 2009-02-07 20:54 ` manu at gcc dot gnu dot org
  2009-05-04 12:48 ` manu at gcc dot gnu dot org
  2009-05-04 12:50 ` manu at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-02-07 20:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from manu at gcc dot gnu dot org  2009-02-07 20:54 -------
Patch here:

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00874.html


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |10/msg00874.html
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-02-07 20:54 ` manu at gcc dot gnu dot org
@ 2009-05-04 12:48 ` manu at gcc dot gnu dot org
  2009-05-04 12:50 ` manu at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-05-04 12:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from manu at gcc dot gnu dot org  2009-05-04 12:48 -------
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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/28152] Diagnostic about wrong use _Complex prints __complex__
  2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-05-04 12:48 ` manu at gcc dot gnu dot org
@ 2009-05-04 12:50 ` manu at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-05-04 12:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from manu at gcc dot gnu dot org  2009-05-04 12:49 -------
FIXED in GCC 4.5


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28152


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-05-04 12:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-24 14:14 [Bug c/28152] New: Diagnostic about wrong use _Complex prints __complex__ steven at gcc dot gnu dot org
2006-06-28 21:21 ` [Bug c/28152] " pinskia at gcc dot gnu dot org
2006-06-28 22:00 ` pinskia at gcc dot gnu dot org
2006-07-02 16:03 ` gdr at integrable-solutions dot net
2006-07-02 16:11 ` pinskia at gcc dot gnu dot org
2006-07-02 16:37 ` gdr at integrable-solutions dot net
2008-08-14 13:04 ` manu at gcc dot gnu dot org
2008-08-14 13:09 ` [Bug c++/28152] " manu at gcc dot gnu dot org
2009-02-07 20:54 ` manu at gcc dot gnu dot org
2009-05-04 12:48 ` manu at gcc dot gnu dot org
2009-05-04 12:50 ` manu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).