This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH to keep Jason from pointing out what a fool I am

>>>>> "Jeffrey" == Jeffrey A Law <> writes:

    Jeffrey>   In message
    Jeffrey> <>you write:
    >>  This patch enables "-W -Wall" even for stage1 builds, if the
    >> native compiler is GCC.  It's handy if you're building a
    >> cross-compiler, or, if like me, you tend to just type `make'
    >> when making a small change to the C++ front-end.  Jeff?

    Jeffrey> It would be better if we only had the warning flags set
    Jeffrey> in one place in the or  Having
    Jeffrey> them appear in multiple places in different files via
    Jeffrey> different mechanisms is a pain.

I don't quite understand this criticism.  I think that what you're
saying is:

  For stage 2/3 builds we enable warnings by setting WARN_CFLAGS in  For stage 1 builds, you (Mark) are proposing enabling
  warnings in  That seems inconsistent.

Assuming I've paraphrased correctly, I'll try to answer the
criticism.  We *unconditionally* set warnings for stage2/3 builds
because we *know* the compiler used with be GCC, and so it will
understand -W -Wall.  Thus, there's no reason to use a configure
mechanism; we just set WARN_CFLAGS unconditionally in the Makefile.
For stage1, though, the compiler might not understand -W -Wall, so
this has to be done via a configuration check, and can't be set
unconditionally in

    Jeffrey> jeff

Mark Mitchell
Mark Mitchell Consulting

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]