https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80780

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The values of __builtin_LINE and __builtin_FUNCTION do the right thing for
NSDMIs, but I don't know what they do to make that work. 

(In reply to Jakub Jelinek from comment #9)
> If there is a user defined ctor, I guess the nsdmis in that ctor should get
> one of the locations of the ctor (but which one),

Any location is valid. The closing paren of the ctor parameter list would be
OK, since that's guaranteed to be present for all ctors, even =default ones.

> what about if there is no
> user defined ctor and the compiler synthetizes it?  What location should
> that have?

Warnings and debuginfo for such ctors tend to point to the "class S" or "struct
S" class-head. Another option would be the line with the NSDMI itself.

Reply via email to