Re: Testing for unknown flags in different compilers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dale Visser:
>>> I have been working on a changes whereby an autoconf
>>> user can invoke a macro like
>>> AC_WARN_ADD([-Wextra])

Carsten Heinrici:
> The point is the portability. Your flags (-Wextra) depend on the actual 
> compiler. This js against the philosophy behind autoconf, which tries to 
> abstract from it.

I disagree, I think this is EXACTLY in the spirit of autoconf.
AC_WARN_ADD is a probe, just like many other autoconf macros.
In this case, this probe determines if "-Wextra" would be okay to add to
the (current) compiler flag, and adds it ONLY if it's okay to add to add it.

I think the macro needs a better name, e.g., "AC_ADD_FLAG_IFVALID" or something.
As far as I can tell this flag-probing macro isn't limited to warnings at all,
so its name may as well reflect that.  That said, enabling or disabling
warnings is what *I* would use this macro for.

> What would be required is a general macro AC_EXTRA_WARNINGS without arguments 
> which could resolve to the actually current arguments of the tool.

Dale Visser is also proposing something like this, though by default.
I think it is *vitally* important that warning flags be on by *default*,
as I've posted earlier. If it's only an option, then in many cases developers and users
will fail to see the warnings that often hint at serious problems
(as sadly happens now).

--- David A. Wheeler

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux