This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: Re-enable warnings for libcpp (build maintainer review requested)


Nathanael Nerode <neroden@fastmail.fm> writes:

> DJ Delorie wrote:
>>>I don't think we have a naming convention for gcc+src-wide autoconf
>>>macros.
>> No, I don't think we do either, and I don't have a better suggestion
>> :-P
> OK, this is going to sound stupid, but how about
>
> TL_*
>
> It's short and stands for "Top level", which is what everyone calls it.
> Nobody else is using it as far as I can tell.

I can live with that.

Thinking about these macros a bit, they're not generic enough for
"oughtta be in autoconf", but they could be made so.  I'm thinking

ACX_PROG_CC_WARNING_OPTS([-Wfoo -Wbar -Wbaz])

  sets WARN_CFLAGS to the subset of the given options which the
  compiler accepts.

ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long ...])

  sets WARN_PEDANTIC to "-pedantic" + the argument, if the compiler
  accepts all of those options simultaneously, otherwise to nothing.

ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z])

  sets WERROR to "-Werror" if the compiler is GCC >=x.y.z, otherwise
  to nothing.

How's that sound?  All very specific to GCC-as-initial-compiler, but
that's no worse than what we have now.

zw


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