a warning to implement
Richard Sandiford
rsandifo@redhat.com
Wed Feb 6 04:24:00 GMT 2002
Gabriel Dos Reis <gdr@codesourcery.com> writes:
> I'm not sure I can represent on this public list, opinions expressed
> on closed mailing-lists. However, you might want to consult
> c++std-core archive. You'll discover people have use of
> self-initialisation even if you cannot imagine such use.
But if gcc doesn't behave the way these people expect, that sounds
like an even better reason to warn as part of -Wall. If gcc
implements the intended behaviour at some point in the future,
we could stop -Wself-initialization or whatever from warning
about those cases.
Out of interest: most of the discussion seems to have been about
"int x = x;". Do these uses give a meaning to more complex
initializers like "int x = (2 * x) + foo();" as well?
Richard
More information about the Gcc
mailing list