http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48386

           Summary: "Cannot declare static function inside another
                    function"
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zx...@mail.ru


Sample code:

struct A {};

struct B 
{
    B( A ) {}
};

int main()
{
    static B b( A() );
}

On build:

g++ ./1.cpp
./1.cpp: In function ‘int main()’:
./1.cpp:10: error: cannot declare static function inside another function

P.S. my English too ugly, please change summary to some adequate if that is
real bug.

Reply via email to