This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11912] New: [3.4 regression] scope in declarations


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]