public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56111] New: {float,double} complex not accepted by g++-4.8 anymore
@ 2013-01-25 17:51 jtaylor.debian at gmail dot com
  2013-01-25 19:14 ` [Bug c++/56111] " glisse at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: jtaylor.debian at gmail dot com @ 2013-01-25 17:51 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56111
           Summary: {float,double} complex not accepted by g++-4.8 anymore
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jtaylor.debian@gmail.com


the C99 float and double complex is not accepted by g++ 4.8 r195467 anymore in
c++98 or c++11.
Even though its technically not part of c++98 it worked in all gcc versions I
ever used.
Is this change intentional? It will break the compilation of a bunch of
scientific c++ software using C libraries.

$ cat test.c
#include <complex.h>
int testing(float complex a);

int main()
{
float complex a = 1;
return testing(a);
}
$ gcc-4.7 test.c -c
$ gcc-4.8 test.c -c
$ g++-4.7 test.c -c

$ g++-4.8 test.c -c
test.c:2:27: error: expected ',' or '...' before 'a'
 int testing(float complex a);
                           ^
test.c: In function 'int main()':
test.c:6:15: error: expected initializer before 'a'
 float complex a = 1;
               ^
test.c:7:16: error: 'a' was not declared in this scope
 return testing(a);
                ^
$ g++-4.8 -std=c++98 test.c -c
test.c:2:27: error: expected ',' or '...' before 'a'
 int testing(float complex a);
                           ^
test.c: In function 'int main()':
test.c:6:15: error: expected initializer before 'a'
 float complex a = 1;
               ^
test.c:7:16: error: 'a' was not declared in this scope
 return testing(a);
                ^
$ g++-4.8 --version
g$-4.8 (Debian 4.8-20130123-1) 4.8.0 20130123 (experimental) [trunk revision
195400]
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


also reproduced with svn trunk r195467 built on a fedora 11 machine.
using ccomplex and -std=c++11 does not work either.


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

end of thread, other threads:[~2013-02-13 22:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 17:51 [Bug c++/56111] New: {float,double} complex not accepted by g++-4.8 anymore jtaylor.debian at gmail dot com
2013-01-25 19:14 ` [Bug c++/56111] " glisse at gcc dot gnu.org
2013-01-26 10:36 ` paolo.carlini at oracle dot com
2013-01-26 10:39 ` paolo.carlini at oracle dot com
2013-01-26 10:58 ` [Bug libstdc++/56111] {float,double,long double} complex not accepted anymore glisse at gcc dot gnu.org
2013-01-26 11:11 ` paolo.carlini at oracle dot com
2013-01-26 11:36 ` glisse at gcc dot gnu.org
2013-01-31 12:31 ` [Bug libstdc++/56111] [4.8 Regression] " glisse at gcc dot gnu.org
2013-01-31 12:37 ` jakub at gcc dot gnu.org
2013-01-31 12:54 ` glisse at gcc dot gnu.org
2013-01-31 12:58 ` paolo.carlini at oracle dot com
2013-01-31 13:06 ` jakub at gcc dot gnu.org
2013-01-31 16:54 ` glisse at gcc dot gnu.org
2013-01-31 17:00 ` paolo.carlini at oracle dot com
2013-02-08 15:46 ` rguenth at gcc dot gnu.org
2013-02-09 18:43 ` jakub at gcc dot gnu.org
2013-02-12 16:54 ` paolo.carlini at oracle dot com
2013-02-12 17:00 ` paolo.carlini at oracle dot com
2013-02-12 20:55 ` glisse at gcc dot gnu.org
2013-02-13 21:59 ` glisse at gcc dot gnu.org
2013-02-13 22:03 ` glisse at gcc dot gnu.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).