I said:
> > I'd like to see autoconf portably *enable* compiler warnings by default (at 
> > least -Wall),
> 
> > for common compilers/linkers.  If it's easy to turn on, more people will do 
> > it.
> > That way, programs would be harder to attack.
> > 
> > Are there strong reasons these aren't already in autoconf?
> 

Eric Blake <ebl...@redhat.com> countered:
> Lack of someone writing the patches.  Are you volunteering?

Hmm.  Would such patches have a fair chance of being accepted?

A key question would be, how would the interface work?

I presume such patches would modify the compiler detection macros
so that they'd also determine "default" warning, relocatability,
and hardening levels, and then provide additional macros
that let people change those levels while using a portable interface.

Then "AC_PROG_CC" would detect warning levels, set some default,
and then configure.ac could do:
AC_PROG_CC_WARNINGS([low])  # off, low, medium, high; default medium
and in gcc "medium" might map to "-Wall".

Does that sound reasonable?

--- David A. Wheeler

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

Reply via email to