This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3600: g++ 2.95.3 complains about "unsigned long( 25 )"
- To: crawford at goingware dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Subject: Re: c++/3600: g++ 2.95.3 complains about "unsigned long( 25 )"
- From: lerdsuwa at gcc dot gnu dot org
- Date: 7 Jul 2001 13:42:22 -0000
Synopsis: g++ 2.95.3 complains about "unsigned long( 25 )"
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Sat Jul 7 06:42:22 2001
State-Changed-Why:
Not a bug. According to the standard, section 5.2.3 Explicit
type conversion (functional notation) paragraph 1:
A simple-type-specifier (7.1.5) followed by a parenthesized
expression-list constructs a value of the specified type
given the expression list. If the expression list is a
single expression, the type conversion expression is
equivalent (in definedness, and if defined in meaning)
to the corresponding cast expression (5.4). ...
And in 7.1.5.2 Simple type specifiers, para 1
The simple type specifiers are
simple-type-specifier:
unsigned
long
<other valid tokens snipped>
So only "unsigned(25)" or "long(25)" is allowed.
"unsigned long(25)" contains two simple-type-specifier's
and therefore is forbid by the 5.2.3 para 1 of the standard.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3600&database=gcc