This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56111] New: {float,double} complex not accepted by g++-4.8 anymore
- From: "jtaylor.debian at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Jan 2013 17:51:10 +0000
- Subject: [Bug c++/56111] New: {float,double} complex not accepted by g++-4.8 anymore
- Auto-submitted: auto-generated
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.
- Follow-Ups:
- [Bug c++/56111] {float,double} complex not accepted by g++-4.8 anymore
- From: glisse at gcc dot gnu.org
- [Bug c++/56111] {float,double} complex not accepted by g++-4.8 anymore
- From: paolo.carlini at oracle dot com
- [Bug c++/56111] {float,double} complex not accepted by g++-4.8 anymore
- From: paolo.carlini at oracle dot com
- [Bug libstdc++/56111] {float,double,long double} complex not accepted anymore
- From: glisse at gcc dot gnu.org
- [Bug libstdc++/56111] {float,double,long double} complex not accepted anymore
- From: paolo.carlini at oracle dot com
- [Bug libstdc++/56111] {float,double,long double} complex not accepted anymore
- From: glisse at gcc dot gnu.org
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: glisse at gcc dot gnu.org
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: jakub at gcc dot gnu.org
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: glisse at gcc dot gnu.org
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: paolo.carlini at oracle dot com
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: jakub at gcc dot gnu.org
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: glisse at gcc dot gnu.org
- [Bug libstdc++/56111] [4.8 Regression] {float,double,long double} complex not accepted anymore
- From: paolo.carlini at oracle dot com