c++/971
nathan@gcc.gnu.org
nathan@gcc.gnu.org
Tue Dec 5 02:36:00 GMT 2000
The following reply was made to PR c++/971; it has been noted by GNATS.
From: nathan@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, rovf@earthling.net
Cc:
Subject: Re: c++/971
Date: 5 Dec 2000 10:30:57 -0000
Synopsis: variable name treated as function pointer
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Tue Dec 5 02:30:57 2000
State-Changed-Why:
There is an ambiguity in the grammer see 8.2/1 in the
standard. Here C++ treats Integral n(Integral ())
as the declaration of a function called n which returns
an Integral and takes as a parameter `Integral ()', which
itself is taken as an unnamed parameter of function type
returning Integral and taking no parameters. That silently
decays to a pointer to said function. Hence the diagnostics
given.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=971&database=gcc
More information about the Gcc-prs
mailing list