[pooma-dev] RFA: Reorder Initializers (2 of 3)

Mark Mitchell mark at codesourcery.com
Thu Mar 29 18:25:03 UTC 2001


>>>>> "Scott" == Scott Haney <swhaney at earthlink.net> writes:

    Scott> I would complain about these warnings to any compiler
    Scott> vendor. I think we thought this could be fixed by
    Scott> CodeSourcery since you guys work on the compiler and we

"could be fixed" => "is broken"

I think that's the key issue; is it broken?

I see that this warning is issued unconditionally, by
semantics.c:finish_mem_initializers.  Jeffrey, we could make that
warning conditional on something.  I don't think flag_pedantic is
appropriate, but we could conditionalize it on extra_warnings.
(That's what -W turns on.)

I see that the copy constructor warning *is* under extra_warnings, so
you are probably compiling with -W.  -W is probably overkill; it will
complain about things that are in the same stylistic category.  For
example, -W will complain about unused parameters, and about code
like:
               struct s { int f, g; };
               struct t { struct s h; int i; };
               struct t x = { 1, 2, 3 };

even though this has well-defined semantics.

Ideally, the various categories of warnings (ordinary warnings, -W
warnings, -Wall warnings, etc.) would have some associated clear
criteria about what belonged where.  Right now, they don't.

I think that the way to go is that some interested party (I'm not,
particulary :-)) should bring this up by sending mail to
`gcc at gcc.gnu.org' and seeing what the response is.

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the pooma-dev mailing list