Are some builtin functions (for example log() vs. sqrt()) more equal than others?

Joseph Myers joseph@codesourcery.com
Fri Jul 30 16:33:56 GMT 2021


None of these are valid constant expressions as defined by the standard 
(constant expressions cannot involve evaluated function calls).  Some 
might be accepted as an extension, but I expect that since the 
optimization for constant arguments is intended for valid calls that would 
otherwise be executed at runtime, not for static initializers, it's 
avoiding optimizations that would result in the loss of floating-point 
exception flag raising.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Gcc mailing list