g++, trunk, recent weird mismatch for arguments with forwarded declaration when attributes are involved
tbp
tbptbp@gmail.com
Tue Sep 14 14:59:00 GMT 2010
Hello,
i know it's no good form to reply to self, or be that insistent, but
i've been hit again.
In the bug report discussion, i've been told by A. Pinski that, as of
now, forward declarations shall have matching attributes. That's fine,
i suppose. What's not is that:
. that new behavior, as far as i know, isn't documented anywhere.
. there's no warning or error at the declaration/definition point.
. it's not consistent (non-compliance only fail in some unknown condition).
. when you finally get an error, it will be about a vaguely related
prototype mismatch somewhere.
Would it be possible to have some clarifications? Shall i file a PR
for a warning? Sacrifice a goat?
PS: now i know better, but i can assure you, anyone running into that
issue is bound to waste tremendous amounts of time trying to figure
out what's wrong with their prototype.
More information about the Gcc
mailing list