------- Comment #2 from dpirch at gmail dot com  2009-02-18 22:16 -------
extfunc cannot change the value of f, it would lead to undefined behavior.

"If an attempt is made to modify an object defined with a const-qualified type
through use of an lvalue with non-const-qualified type, the behavior is
undefined." (ISO/IEC 9899:TC3, 6.7.3)

BTW, the function is actually inlined if f is declared as static const.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39234

Reply via email to