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 debug/22069] "gcc -gstabs+ -O3" generates erroneous stabs for inlined funcs


------- Additional Comments From bhavesh at avaya dot com  2005-06-14 22:51 -------
(In reply to comment #1)
> The code is invalid and gives errors from 4.0.0 and above:
> t.c: In function ?func1?:
> t.c:3: error: invalid storage class for function ?func2?
> t.c: At top level:
> t.c:14: error: static declaration of ?func2? follows non-static declaration
> t.c:7: error: previous implicit declaration of ?func2? was here

Okay. What about this, then:

int func1(int parm1)
{
        static int func2();
        int var1=0;

        if (parm1 == 10) {
                var1=func2();
        }

        return var1;
}

static int func2()
{
        return 20;
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |


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


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