This is the mail archive of the gcc-patches@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]

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


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.


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