On 2020-04-26 2:13 PM, Thomas David Rivers wrote:
There's a lot being thrown around here....

However, there _are_ places in the C language where the compiler must
fold constants at compile time, e.g.:

   enum tag { one = (1+0), two = (1+1+0) };

That is obliged to compile and the compiler most compute those
additions to provide the proper values for the "one" and "two" enumeration
constants.

The C standard has more details about this.    So most compilers will
easily handle most constant computions (there are several corners
that are interesting to consider...  probably only interesting to
compiler writers :-) )

It seems there were plenty of other answers about the vagaries
of parameters and default integer promotions, etc...

Great post (from an expert)! default integer promotions can be particularly treacherous!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to