This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59821] __builtin_LINE and __builtin_FILE for new'd objects is wrong
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jan 2014 18:18:13 +0000
- Subject: [Bug c++/59821] __builtin_LINE and __builtin_FILE for new'd objects is wrong
- Auto-submitted: auto-generated
- References: <bug-59821-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59821
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> While I agree with that, for _builtin_{LINE,FILE,FUNCTION} (), those were
> added specifically for the use in default arguments and were I think from
> the start meant to give you the location of the call, not of the token where
> it appears, otherwise those builtins don't make much sense (you could use
> __LINE__, __FILE__ or __FUNCTION__ instead).
Ah, I see. In that case, I agree that adjusting their locations in
break_out_target_exprs is the way to go.