This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/22069] "gcc -gstabs+ -O3" generates erroneous stabs for inlined funcs
- From: "bhavesh at avaya dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jun 2005 22:51:45 -0000
- Subject: [Bug debug/22069] "gcc -gstabs+ -O3" generates erroneous stabs for inlined funcs
- References: <20050614223847.22069.bhavesh@avaya.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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