This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH] Add __attribute__((__artificial__)) (__nodebug__ alternative)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org, Daniel Berlin <dberlin at dberlin dot org>, Daniel Jacobowitz <drow at false dot org>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, Roland McGrath <roland at redhat dot com>
- Date: Tue, 24 Feb 2009 10:53:03 +0100
- Subject: Re: [RFC PATCH] Add __attribute__((__artificial__)) (__nodebug__ alternative)
- References: <20070831190520.GM2063@devserv.devel.redhat.com> <46F2DC57.1060307@redhat.com> <84fc9c000902230646i55b25c78j55700946d342fc98@mail.gmail.com> <49A311FE.30405@redhat.com>
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.