On Thu, 15 Jan 2026, Andrew Pinski wrote: > > + pfile->state.parsing_args = saved_parsing_args; > > + pfile->keep_tokens = saved_keep_tokens; > > + pfile->state.prevent_expansion = saved_prevent_expansion; > > + > > + if (m > (unsigned long) LONG_MAX) > I am not even sure this could ever happen as it would require more > memory than the machine had to get to this point.
I suspect this is trying to implement the bit of the paper with a "representable as signed long" constraint. Which is not a coherent specification, given that the preprocessor isn't supposed to know about type sizes at all, so the specification is unclear whether it's actually following the #if expression evaluation rules where all signed types have the same representation as intmax_t. Furthermore, this would not be a valid implementation of that part of the paper, since whatever version of signed long is being referred to in the paper, it must clearly be one associated with the *target* not the *host*, and LONG_MAX is for the host. -- Joseph S. Myers [email protected]
