ATTRIBUTE_NORETURN on sets_cc0_p
Mark Mitchell
mark@markmitchell.com
Fri Oct 16 10:40:00 GMT 1998
>>>>> "Jeffrey" == Jeffrey A Law <law@cygnus.com> writes:
Jeffrey> I'm very tempted to punt it for now since marking
Jeffrey> sets_cc0_p as noreturn is strictly an optimization.
And a pretty unimportant one. It's only noreturn because all it does
is call `abort()' in the non-HAVE-cc0 case. We could just call abort
directly in that case via some macro magic if it's that important to
let the compiler know the call will not return.
I don't really think the `function not marked noreturn but doesn't
return' warning is very good. This warnings means that to get gcc to
shut up, I *must* use a gcc extension on perfectly valid, unambiguous,
unconfusing code. That's unreasonable. This warning attempts to
force me to give the compiler an additional optimization hint, not to
in any way clarify the function. (It's not like signed/unsigned
comparison, for example, which is well-defined but wicked confusing.)
I think the right solution is no pull this warning out of -W -Wall,
and only enable it with a special -Wnoreturn flag or some such.
I don't have a problem with the opposite warning (`function uses
noreturn but returns anyhow').
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
More information about the Gcc
mailing list