Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42196 )
Change subject: assert.h: Do not use __FILE__ nor __LINE__ on timeless builds ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42196/2/src/include/assert.h File src/include/assert.h:
https://review.coreboot.org/c/coreboot/+/42196/2/src/include/assert.h@17 PS2, Line 17: #line 404 "(filenames not available on timeless builds)" So does this actually work? From my understanding of what the #line directive does, it shouldn't... you're just telling the preprocessor that *this very line* is line 404, but it will still keep counting further after that. It doesn't just return 404 in all future __LINE__ macros.
Besides, I think you're changing the line number and file name for the assert.h file here. But the __LINE__ macro is evaluated in the context of the file where the ASSERT() was invoked, so I don't think you would affect that at all with this. I think if you want to do what you want to do, you have to go with your previous approach (I tested it now, I think that should work and still give you the original line number despite the double replacement).