Submitter:Fred J. Tydeman
Document: WG14 N1943
Related: WG14 N1911
Based upon my reading of the standard, it appears that the following are ambiguous, so are a possible defect.
An example of that.
#line 500 #define MAC() __LINE__ #line 1000 int j = MAC(); /* is this 500 or 1000? */
However, 188.8.131.52 requires that the assert macro write information about the call that has a false expression. That information includes the __LINE__ and __FILE__ preprocessing macros. So, there is a requirement that this specific macro using __LINE__ and __FILE__ have the line number and file name of the invocation, not the line number and file name of the replacment list (in <assert.h>).
Suggested Technical Corrigendum
Add to 184.108.40.206, paragraph 1, item __LINE__:
The line number associated with a __LINE__ in a macro replacment list is the line number of the macro invocation.
Add to 220.127.116.11, paragraph 1, item __FILE__:
The source file name associated with a __FILE__ in a macro replacment list is the source file name of the macro invocation.