[Bug c++/12314] New: variables with name 'default' cannot be used
gvacanti at cosine dot nl
gcc-bugzilla@gcc.gnu.org
Wed Sep 17 11:33:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12314
Summary: variables with name 'default' cannot be used
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gvacanti at cosine dot nl
CC: gcc-bugs at gcc dot gnu dot org
The following piece of code:
(in file bug.c or bug.cc)
int main() {
double default = 4;
}
fails to compile, both with gcc and g++:
cc bug.c -o bug
bug.c: In function `main':
bug.c:4: parse error before "default"
make: *** [bug] Error 1
I can reproduce the problmen on Solaris 8 and GNU/Linux RH 9:
Solaris: gcc 3.2.2
RH gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
On GNU/Linux RH 8 (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) I have
the same.
More information about the Gcc-bugs
mailing list