automake-patches
[Top][All Lists]
Advanced

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

FYI: -Wunused -> -Wsyntax


From: Alexandre Duret-Lutz
Subject: FYI: -Wunused -> -Wsyntax
Date: 17 Sep 2002 20:02:34 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

This rename -Wunused into -Wsyntax, and make the 
"x is a target; expected a variable"-error a syntactic warning.

The suggestion for `-Wsyntax' comes from Akim (autoconf supports
-Wsyntax too).

2002-09-17  Alexandre Duret-Lutz  <address@hidden>

        * automake.in: Rename the 'unused' channel to 'syntax'.
        (variable_defined): Issue a warning instead of an error
        for variable-is-a-target conditions.
        * automake.texi (Invoking Automake): Rename the 'unused'
        channel to 'syntax'.
        * tests/warnopts.test: Likewise.

Index: aclocal.m4
===================================================================
RCS file: /cvs/automake/automake/aclocal.m4,v
retrieving revision 1.95
diff -u -r1.95 aclocal.m4
--- aclocal.m4  16 Sep 2002 10:12:20 -0000      1.95
+++ aclocal.m4  17 Sep 2002 18:00:47 -0000
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.6c -*- Autoconf -*-
+# generated automatically by aclocal  -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1351
diff -u -r1.1351 automake.in
--- automake.in 16 Sep 2002 09:08:54 -0000      1.1351
+++ automake.in 17 Sep 2002 18:01:25 -0000
@@ -869,16 +869,16 @@
             "####################\n"),
   footer => "\nPlease contact <address@hidden>.";
 
-# Warnings about unsupported (or mis-supported) features.
-register_channel 'unsupported', type => 'warning';
-# Unused variables.
-register_channel 'unused', type => 'warning';
+# Warnings related to GNU Coding Standards.
+register_channel 'gnu', type => 'warning';
 # Warnings about obsolete features (silent by default).
 register_channel 'obsolete', type => 'warning', silent => 1;
 # Warnings about non-portable constructs.
 register_channel 'portability', type => 'warning', silent => 1;
-# Warnings related to GNU Coding Standards.
-register_channel 'gnu', type => 'warning';
+# Weird syntax, unused variables, typos...
+register_channel 'syntax', type => 'warning';
+# Warnings about unsupported (or mis-supported) features.
+register_channel 'unsupported', type => 'warning';
 
 # For &verb.
 register_channel 'verb', type => 'debug', silent => 1;
@@ -3440,7 +3440,7 @@
       foreach my $primary ('_SOURCES', '_LIBADD', '_LDADD', '_LDFLAGS',
                           '_DEPENDENCIES')
        {
-         msg_var 'unused', $varname, "unused variable: `$varname'"
+         msg_var 'syntax', $varname, "unused variable: `$varname'"
            # Note that a configure variable is always legitimate.
            if ($varname =~ /$primary$/ && ! $content_seen{$varname}
                && ! exists $configure_vars{$varname});
@@ -6519,7 +6519,8 @@
                # to create rules for things like `bin_PROGRAMS = LDADD'.
                if ($target_owner{$var}{$tcond} == TARGET_USER)
                  {
-                   err_cond_target ($tcond, $var, "`$var' is a target; "
+                   msg_cond_target ('syntax', $tcond, $var,
+                                    "`$var' is a target; "
                                     . "expected a variable");
                    return 0;
                  }
@@ -8969,9 +8970,9 @@
 Warning categories include:
   `gnu'           GNU coding standards (default in gnu and gnits modes)
   `obsolete'      obsolete features or constructions
-  `unsupported'   unsupported or incomplete features (default)
-  `unused'        unused variables (default)
   `portability'   portability issues
+  `syntax'        dubious syntactic constructs (default)
+  `unsupported'   unsupported or incomplete features (default)
   `all'           all the warnings
   `no-CATEGORY'   turn off warnings in CATEGORY
   `none'          turn off all the warnings
Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.300
diff -u -r1.300 automake.texi
--- automake.texi       13 Sep 2002 16:37:01 -0000      1.300
+++ automake.texi       17 Sep 2002 18:01:48 -0000
@@ -1040,12 +1040,12 @@
 (@pxref{Top, , , standards, The GNU Coding Standards}).
 @item obsolete
 obsolete features or constructions
address@hidden unsupported
-unsupported or incomplete features
address@hidden unused
-unused variables
 @item portability
 portability issues (e.g., use of Make features which are known not portable)
address@hidden syntax
+weird syntax, unused variables, typos
address@hidden unsupported
+unsupported or incomplete features
 @item all
 all the warnings
 @item none
@@ -1055,11 +1055,11 @@
 @end table
 
 A category can be turned off by prefixing its name with @samp{no-}.  For
-instance @samp{-Wno-unused} will hide the warnings about unused
+instance @samp{-Wno-syntax} will hide the warnings about unused
 variables.
 
-The categories output by default are @samp{unsupported} and
address@hidden  Additionally, @samp{gnu} is enabled in @samp{--gnu} and
+The categories output by default are @samp{syntax} and
address@hidden  Additionally, @samp{gnu} is enabled in @samp{--gnu} and
 @samp{--gnits} strictness.
 
 @samp{portability} warnings are currently disabled by default, but they
Index: stamp-vti
===================================================================
RCS file: /cvs/automake/automake/stamp-vti,v
retrieving revision 1.203
diff -u -r1.203 stamp-vti
--- stamp-vti   16 Sep 2002 10:12:21 -0000      1.203
+++ stamp-vti   17 Sep 2002 18:01:56 -0000
@@ -1,4 +1,4 @@
address@hidden UPDATED 16 September 2002
address@hidden UPDATED 17 September 2002
 @set UPDATED-MONTH September 2002
 @set EDITION 1.6c
 @set VERSION 1.6c
Index: version.texi
===================================================================
RCS file: /cvs/automake/automake/version.texi,v
retrieving revision 1.275
diff -u -r1.275 version.texi
--- version.texi        16 Sep 2002 10:12:21 -0000      1.275
+++ version.texi        17 Sep 2002 18:01:56 -0000
@@ -1,4 +1,4 @@
address@hidden UPDATED 16 September 2002
address@hidden UPDATED 17 September 2002
 @set UPDATED-MONTH September 2002
 @set EDITION 1.6c
 @set VERSION 1.6c
Index: tests/warnopts.test
===================================================================
RCS file: /cvs/automake/automake/tests/warnopts.test,v
retrieving revision 1.2
diff -u -r1.2 warnopts.test
--- tests/warnopts.test 8 Sep 2002 13:07:56 -0000       1.2
+++ tests/warnopts.test 17 Sep 2002 18:01:57 -0000
@@ -43,7 +43,7 @@
 END
 
 cat >sub/Makefile.am <<END
-AUTOMAKE_OPTIONS = -Wno-unused
+AUTOMAKE_OPTIONS = -Wno-syntax
 INCLUDES = -Ifoo
 foo_SOURCES = unused
 END
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]