GNU bug report logs - #7669
option "foreign" after "-Wall" turns off and portability warnings.

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Fri, 17 Dec 2010 18:47:04 UTC

Severity: normal

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7669 in the body.
You can then email your comments to 7669 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-automake <at> gnu.org:
bug#7669; Package automake. (Fri, 17 Dec 2010 18:47:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 17 Dec 2010 18:47:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: option "foreign" after "-Wall" turns off and portability warnings.
Date: Fri, 17 Dec 2010 19:52:29 +0100
Hello automakers.

This is basically just a reproposal of PR/547 from the old gnats database;
I'm resubmitting it here because I'd really like to see it fixed, and
having it reported in the new, more visible debbugs-based bug database
might help in this respect.

-*-*-*-

With automake >= 1.10, foreign *after* -Wall in AM_INIT_AUTOMAKE turns
off portability warnings.

  $ cat >> configure.ac <<'END'
  AC_INIT([foo], [1.0])
  AM_INIT_AUTOMAKE([foreign -Wall])
  AC_CONFIG_FILES([Makefile])
  AC_PROG_CC
  END
  $ aclocal
  $ cat > Makefile.am <<'END'
  CFLAGS := $(wildcard *)
  bin_PROGRAMS = foo
  END
  $ automake -a # will warn as expected
  Makefile.am:1: `:='-style assignments are not portable
  Makefile.am:1: wildcard *: non-POSIX variable name
  Makefile.am:1: (probably a GNU make extension)
  Makefile.am:1: `CFLAGS' is a user variable, you should not override it;
  Makefile.am:1: use `AM_CFLAGS' instead.
  $ # now put `foreign' after `-Wall'
  $ sed -i 's/foreign -Wall/-Wall foreign/' configure.ac
  $ automake -a # gives no warnings!
  $ automake -a -Wall # but this does, luckily
  Makefile.am:1: `:='-style assignments are not portable
  Makefile.am:1: wildcard *: non-POSIX variable name
  Makefile.am:1: (probably a GNU make extension)
  Makefile.am:1: `CFLAGS' is a user variable, you should not override it;
  Makefile.am:1: use `AM_CFLAGS' instead.

While the current behaviour is due to various historical and implementation
reasons, IMHO it is counter-intuitive and somewhat "dangerous", since
programmers enabling the `foreign' option might unwittingly be prevented
from seeing portability warnings -- when they think to have enabled those
warnings!

Regards,
   Stefano




Information forwarded to owner <at> debbugs.gnu.org, bug-automake <at> gnu.org:
bug#7669; Package automake. (Sun, 19 Dec 2010 11:46:02 GMT) Full text and rfc822 format available.

Message #8 received at 7669 <at> debbugs.gnu.org (full text, mbox):

From: Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 7669 <at> debbugs.gnu.org
Subject: Re: bug#7669: option "foreign" after "-Wall" turns off and
	portability warnings.
Date: Sun, 19 Dec 2010 12:51:39 +0100
* Stefano Lattarini wrote on Fri, Dec 17, 2010 at 07:52:29PM CET:
> With automake >= 1.10, foreign *after* -Wall in AM_INIT_AUTOMAKE turns
> off portability warnings.

> While the current behaviour is due to various historical and implementation
> reasons, IMHO it is counter-intuitive and somewhat "dangerous", since
> programmers enabling the `foreign' option might unwittingly be prevented
> from seeing portability warnings -- when they think to have enabled those
> warnings!

Fixing this will turn (at least user-provided) silent-rules rules noisy,
I think.  Given however that the nested variable expansion involved may
be in a future Posix (if I get to analyzing the remaining questions from
Eric in time), one possible strategy out is optimistically not warning
about them any more and otherwise letting me get to the testing ... ;-)

I'm not sure if there were also other reasons for the current behavior,
but I think the discussion at the time the patches were put in place
should reveal that.

And yes, I agree that the behavior is bad.

Thanks for looking into this,
Ralf




Information forwarded to owner <at> debbugs.gnu.org, bug-automake <at> gnu.org:
bug#7669; Package automake. (Thu, 23 Dec 2010 14:40:03 GMT) Full text and rfc822 format available.

Message #11 received at 7669 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
Cc: 7669 <at> debbugs.gnu.org
Subject: Re: bug#7669: option "foreign" after "-Wall" turns off and
	portability warnings.
Date: Thu, 23 Dec 2010 15:46:19 +0100
tags 7669 patch
thanks

On Sunday 19 December 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Fri, Dec 17, 2010 at 07:52:29PM CET:
> > With automake >= 1.10, foreign *after* -Wall in AM_INIT_AUTOMAKE turns
> > off portability warnings.
> 
> > While the current behaviour is due to various historical and implementation
> > reasons, IMHO it is counter-intuitive and somewhat "dangerous", since
> > programmers enabling the `foreign' option might unwittingly be prevented
> > from seeing portability warnings -- when they think to have enabled those
> > warnings!
> 
Now I've posted a patch series about this; see:
 <http://lists.gnu.org/archive/html/automake-patches/2010-12/msg00139.html>

> Fixing this will turn (at least user-provided) silent-rules rules noisy,
> I think.
>
Luckily no: the pre-existing code was already smart enough that I managed
to avoid this problem with no efforts.  I added a testcase about it, BTW.

> Given however that the nested variable expansion involved may
> be in a future Posix (if I get to analyzing the remaining questions from
> Eric in time), one possible strategy out is optimistically not warning
> about them any more and otherwise letting me get to the testing ... ;-)
> 
This won't be necessary (but having nested variable expansion in POSIX
would be great anyway!)

Regards,
   Stefano




Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 23 Dec 2010 14:40:04 GMT) Full text and rfc822 format available.

Reply sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
You have taken responsibility. (Sat, 15 Jan 2011 20:23:02 GMT) Full text and rfc822 format available.

Notification sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
bug acknowledged by developer. (Sat, 15 Jan 2011 20:23:02 GMT) Full text and rfc822 format available.

Message #18 received at 7669-done <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
Cc: 7669-done <at> debbugs.gnu.org
Subject: Re: bug#7669: option "foreign" after "-Wall" turns off and
	portability warnings.
Date: Sat, 15 Jan 2011 21:28:39 +0100
On Thursday 23 December 2010, Stefano Lattarini wrote:
> On Sunday 19 December 2010, Ralf Wildenhues wrote:
> > * Stefano Lattarini wrote on Fri, Dec 17, 2010 at 07:52:29PM CET:
> > > With automake >= 1.10, foreign *after* -Wall in AM_INIT_AUTOMAKE turns
> > > off portability warnings.
> > 
> > > While the current behaviour is due to various historical and implementation
> > > reasons, IMHO it is counter-intuitive and somewhat "dangerous", since
> > > programmers enabling the `foreign' option might unwittingly be prevented
> > > from seeing portability warnings -- when they think to have enabled those
> > > warnings!
> > 
> Now I've posted a patch series about this; see:
>  <http://lists.gnu.org/archive/html/automake-patches/2010-12/msg00139.html>
> 
The patch series has been applied (with some churns and amendings), see:
 <http://lists.gnu.org/archive/html/automake-patches/2011-01/msg00039.html>
 <http://lists.gnu.org/archive/html/automake-patches/2011-01/msg00170.html>
and merged to master with commit `v1.11-640-gf4f5bbe'.

This should fix the bug.

Regards,
  Stefano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Feb 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.