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, 18.104.22.168 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 22.214.171.124, 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 126.96.36.199, 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.