This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7008: unexpected error message "var was not declared in this scope"
- From: lerdsuwa at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rdabrowa at poczta dot onet dot pl
- Date: 11 Jul 2002 14:39:20 -0000
- Subject: Re: c++/7008: unexpected error message "var was not declared in this scope"
- Reply-to: lerdsuwa at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rdabrowa at poczta dot onet dot pl, gcc-gnats at gcc dot gnu dot org
Synopsis: unexpected error message "var was not declared in this scope"
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Thu Jul 11 07:39:20 2002
State-Changed-Why:
Not a bug. According to the standard, section 9.8p1:
Declarations in a local class can use only type names,
static variables, extern variables and functions, and
enumerators from the enclosing scope.
The 'var' which is a function parameter is not allowed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7008