[RFC PATCH] Add __attribute__((__artificial__)) (__nodebug__ alternative)

Richard Guenther richard.guenther@gmail.com
Tue Feb 24 12:47:00 GMT 2009


On Mon, Feb 23, 2009 at 10:15 PM, Jason Merrill <jason@redhat.com> wrote:
> Richard Guenther wrote:
>>
>> I wonder why the patch didn't
>> just teach the inliner to put the call source location on all inlined
>> statements?
>
> That would be less accurate than leaving the real source location on and
> putting the call source location on the DW_TAG_inlined_function, as we now
> do.

I see.  I have a patch dealing with it differently which seems to
circumvent the system-header check and prints the inline location like

In file included from t.c:1:
In function 'strcpy',
    inlined from 'main' at t.c:5:
t.h:6: warning: call to __builtin___strcpy_chk will always overflow
destination buffer

but only if you specify -g, otherwise we throw away the interesting
blocks with the original source locations and you just get (but still
from within system-headers)

In file included from t.c:1:
t.h: In function 'main':
t.h:6: warning: call to __builtin___strcpy_chk will always overflow
destination buffer

Which works for me.

Richard.



More information about the Gcc-patches mailing list