This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11912] New: [3.4 regression] scope in declarations
- From: "mueller at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2003 01:37:00 -0000
- Subject: [Bug c++/11912] New: [3.4 regression] scope in declarations
- 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=11912
Summary: [3.4 regression] scope in declarations
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mueller at kde dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
Hi,
I'm not sure if this is valid C++, but as it used to work and I cannot
find this change documented in the NEWS file I report it anyway.
Previously, I was able to compile this code:
int selection() { return 1; }
int main()
{
int selection( selection() );
return selection;
};
current mainline (20030812) says:
x.cc: In function `int main()':
x.cc:5: error: `selection' cannot be used as a function
it seems it adds the "selection" to the scope before it finished parsing
the declaration.