This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12314] New: variables with name 'default' cannot be used
- From: "gvacanti at cosine dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2003 09:04:58 -0000
- Subject: [Bug c++/12314] New: variables with name 'default' cannot be used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.