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

--- Comment #5 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to Sriraman Tallam from comment #4)
> I do not understand why the default function's attributes should be applied
> to all declarations?

The alternative is to not apply them to all declarations, but give an error if
any declarations are in conflict. Take example f3: if that means the default
function uses regparm(3), but the target function does not, then if the
dispatcher uses regparm(3), dispatching to the target function will fail. If
the dispatcher doesn't use regparm(3), dispatching to the default function will
fail. Making it an error would be just as safe and sensible, but IMO slightly
less user-friendly, and most of the work to check attribute compatibility would
need to be done either way.

Reply via email to