summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-19 20:02:28 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-19 20:02:28 +0000
commitede5a481889ac50f9e9034e534dbcaccd589d724 (patch)
tree1df9bafac89190d0399bae0615e62acab0097f1f /gcc/testsuite/gcc.dg
parent2debe3a3c02a6bda9a188be8fcd163c7913efe1b (diff)
downloadgcc-ede5a481889ac50f9e9034e534dbcaccd589d724.tar.gz
2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* c.opt (Waddress): New. * common.opt (Walways-true): Delete. (Wstring-literal-comparison): Delete. * doc/invoke.texi (Warning Options): Delete -Walways-true and -Wstring-literal-comparison. Add -Waddress. (Waddress): New. (Walways-true): Delete. (Wstring-literal-comparison): Delete. * doc/extend.texi (#pragma GCC diagnostic): Use -Wformat consistently instead of -Walways-true in example. * c-opts.c (c_common_handle_option): -Waddress is enabled by -Wall. * c-typeck.c (parser_build_binary_op): Replace -Wstring-literal-comparison and -Walways-true with -Waddress. * c-common.c (c_common_truthvalue_conversion): Replace -Walways-true with -Waddress. cp/ * typeck.c (build_binary_op): Replace -Wstring-literal-comparison and -Walways-true with -Waddress. * cvt.c (convert_to_void): Replace unconditional warning with -Waddress. testsuite/ * gcc.dg/20031012-1.c: Replace -Walways-true with -Waddress. * gcc.dg/Walways-true-1.c: Likewise. * gcc.dg/weak/weak-3.c: Likewise. * gcc.dg/Werror-1.c: Likewise. * gcc.dg/Werror-3.c: Likewise. * gcc.dg/Werror-4.c: Likewise. * gcc.dg/Werror-5.c: Likewise. * gcc.dg/Werror-6.c: Likewise. * gcc.dg/Werror-7.c: Likewise. * gcc.dg/Werror-8.c: Likewise. * gcc.dg/Werror-10.c: Likewise. * gcc.dg/Werror-11.c: Likewise. * gcc.dg/Werror-12.c: Likewise. * g++.old-deja/g++.mike/warn8.C: Likewise. * g++.dg/warn/Walways-true-1.C: Likewise. * g++.dg/warn/Walways-true-2.C: Likewise. * g++.dg/warn/noeffect8.C: Warn only with -Waddress. * g++.dg/warn/Wstring-literal-comparison-1.C: Replace -Wstring-literal-comparison with -Waddress. * gcc.dg/Wstring-literal-comparison-4.c: Replace -Wno-string-literal-comparison with -Wno-address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122136 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/20031012-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/Walways-true-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/Walways-true-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/Werror-10.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-12.c4
-rw-r--r--gcc/testsuite/gcc.dg/Werror-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/Werror-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wstring-literal-comparison-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wstring-literal-comparison-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/warn-addr-cmp.c2
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-3.c2
18 files changed, 21 insertions, 21 deletions
diff --git a/gcc/testsuite/gcc.dg/20031012-1.c b/gcc/testsuite/gcc.dg/20031012-1.c
index cdfed68e09a..f83e1d3f57c 100644
--- a/gcc/testsuite/gcc.dg/20031012-1.c
+++ b/gcc/testsuite/gcc.dg/20031012-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-Walways-true" } */
+/* { dg-options "-Waddress" } */
/* Origin: Andrew Morton <akpm@osdl.org> */
/* Warn if a function addres of a non-weak function is used
as a truth value. */
diff --git a/gcc/testsuite/gcc.dg/Walways-true-1.c b/gcc/testsuite/gcc.dg/Walways-true-1.c
index f531e8f4b79..299932fcf55 100644
--- a/gcc/testsuite/gcc.dg/Walways-true-1.c
+++ b/gcc/testsuite/gcc.dg/Walways-true-1.c
@@ -1,8 +1,8 @@
-/* Test -Walways-true for testing an address against NULL.
+/* Test -Waddress for testing an address against NULL.
Origin: Ian Lance Taylor <iant@google.com>. */
/* { dg-do compile} */
-/* { dg-options "-Walways-true" } */
+/* { dg-options "-Waddress" } */
extern int foo (int);
diff --git a/gcc/testsuite/gcc.dg/Walways-true-2.c b/gcc/testsuite/gcc.dg/Walways-true-2.c
index cab897b4e3d..c14857eaee6 100644
--- a/gcc/testsuite/gcc.dg/Walways-true-2.c
+++ b/gcc/testsuite/gcc.dg/Walways-true-2.c
@@ -4,7 +4,7 @@
Origin: Ian Lance Taylor <iant@google.com>. */
/* { dg-do compile} */
-/* { dg-options "-Walways-true" } */
+/* { dg-options "-Waddress" } */
/* { dg-require-weak "" } */
extern int foo (int) __attribute__ ((weak));
diff --git a/gcc/testsuite/gcc.dg/Werror-1.c b/gcc/testsuite/gcc.dg/Werror-1.c
index d50e07c45f2..7984740ca88 100644
--- a/gcc/testsuite/gcc.dg/Werror-1.c
+++ b/gcc/testsuite/gcc.dg/Werror-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Walways-true -Wattributes -Werror" } */
+/* { dg-options "-Waddress -Wattributes -Werror" } */
/* { dg-warning "warnings being treated as errors" "" {target "*-*-*"} 0 } */
/* This is the first in a series of test cases that test the
@@ -7,7 +7,7 @@
diagnostic error foo. This one has all the bits we're testing, the
others are subsets of this one. */
-#pragma GCC diagnostic error "-Walways-true"
+#pragma GCC diagnostic error "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Werror-10.c b/gcc/testsuite/gcc.dg/Werror-10.c
index 3e2c9dffa4f..eeadf512b5b 100644
--- a/gcc/testsuite/gcc.dg/Werror-10.c
+++ b/gcc/testsuite/gcc.dg/Werror-10.c
@@ -4,7 +4,7 @@
/* Make sure #pragma can work with -Werror. */
-#pragma GCC diagnostic error "-Walways-true"
+#pragma GCC diagnostic error "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Werror-11.c b/gcc/testsuite/gcc.dg/Werror-11.c
index 14aae3129f8..493ded044a8 100644
--- a/gcc/testsuite/gcc.dg/Werror-11.c
+++ b/gcc/testsuite/gcc.dg/Werror-11.c
@@ -4,7 +4,7 @@
/* Make sure #pragma can override -Werror. */
-#pragma GCC diagnostic warning "-Walways-true"
+#pragma GCC diagnostic warning "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Werror-12.c b/gcc/testsuite/gcc.dg/Werror-12.c
index 0cb1f78f805..4f0bd17623b 100644
--- a/gcc/testsuite/gcc.dg/Werror-12.c
+++ b/gcc/testsuite/gcc.dg/Werror-12.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-Wattributes -Walways-true" } */
+/* { dg-options "-Wattributes -Waddress" } */
/* Make sure #pragma can override -Wfoo. */
-#pragma GCC diagnostic ignored "-Walways-true"
+#pragma GCC diagnostic ignored "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Werror-3.c b/gcc/testsuite/gcc.dg/Werror-3.c
index a994714446c..b95dd8b6a3d 100644
--- a/gcc/testsuite/gcc.dg/Werror-3.c
+++ b/gcc/testsuite/gcc.dg/Werror-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Walways-true -Wattributes" } */
+/* { dg-options "-Waddress -Wattributes" } */
/* Make sure the command line option enables the warning. */
diff --git a/gcc/testsuite/gcc.dg/Werror-4.c b/gcc/testsuite/gcc.dg/Werror-4.c
index 45d217b3233..2c66fc9d477 100644
--- a/gcc/testsuite/gcc.dg/Werror-4.c
+++ b/gcc/testsuite/gcc.dg/Werror-4.c
@@ -3,7 +3,7 @@
/* Make sure the pragma enables the error. */
-#pragma GCC diagnostic error "-Walways-true"
+#pragma GCC diagnostic error "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Werror-5.c b/gcc/testsuite/gcc.dg/Werror-5.c
index 39125904dfa..40d3cd1f7ad 100644
--- a/gcc/testsuite/gcc.dg/Werror-5.c
+++ b/gcc/testsuite/gcc.dg/Werror-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Walways-true -Wattributes -Werror" } */
+/* { dg-options "-Waddress -Wattributes -Werror" } */
/* { dg-warning "warnings being treated as errors" "" {target "*-*-*"} 0 } */
/* Make sure -Werror turns warnings in to errors. */
diff --git a/gcc/testsuite/gcc.dg/Werror-6.c b/gcc/testsuite/gcc.dg/Werror-6.c
index 11f28b0aa6a..62f0e4f4041 100644
--- a/gcc/testsuite/gcc.dg/Werror-6.c
+++ b/gcc/testsuite/gcc.dg/Werror-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wattributes -Werror=always-true" } */
+/* { dg-options "-Wattributes -Werror=address" } */
/* Make sure -Werror-foo emits an error and not a warning */
diff --git a/gcc/testsuite/gcc.dg/Werror-7.c b/gcc/testsuite/gcc.dg/Werror-7.c
index e6671991f5a..9829ce9e4f7 100644
--- a/gcc/testsuite/gcc.dg/Werror-7.c
+++ b/gcc/testsuite/gcc.dg/Werror-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Walways-true -Werror -Wno-error=always-true -Wattributes" } */
+/* { dg-options "-Waddress -Werror -Wno-error=address -Wattributes" } */
/* { dg-warning "warnings being treated as errors" "" {target "*-*-*"} 0 } */
/* Make sure -Wno-error= overrides -Werror. */
diff --git a/gcc/testsuite/gcc.dg/Werror-8.c b/gcc/testsuite/gcc.dg/Werror-8.c
index ec70a2e8eab..5051b7aa47c 100644
--- a/gcc/testsuite/gcc.dg/Werror-8.c
+++ b/gcc/testsuite/gcc.dg/Werror-8.c
@@ -3,7 +3,7 @@
/* Make sure #pragma can enable a warning. */
-#pragma GCC diagnostic warning "-Walways-true"
+#pragma GCC diagnostic warning "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Werror-9.c b/gcc/testsuite/gcc.dg/Werror-9.c
index 5b287793f55..30326a4799a 100644
--- a/gcc/testsuite/gcc.dg/Werror-9.c
+++ b/gcc/testsuite/gcc.dg/Werror-9.c
@@ -3,7 +3,7 @@
/* Make sure #pragma can enable a warning as an error. */
-#pragma GCC diagnostic error "-Walways-true"
+#pragma GCC diagnostic error "-Waddress"
void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Wstring-literal-comparison-1.c b/gcc/testsuite/gcc.dg/Wstring-literal-comparison-1.c
index c5dea463b51..97e317644d5 100644
--- a/gcc/testsuite/gcc.dg/Wstring-literal-comparison-1.c
+++ b/gcc/testsuite/gcc.dg/Wstring-literal-comparison-1.c
@@ -1,6 +1,6 @@
/* PR c/7776 */
/* { dg-do compile } */
-/* { dg-options "-Wstring-literal-comparison" } */
+/* { dg-options "-Waddress" } */
int test1(char *ptr)
{
diff --git a/gcc/testsuite/gcc.dg/Wstring-literal-comparison-4.c b/gcc/testsuite/gcc.dg/Wstring-literal-comparison-4.c
index 27f25f3ca98..f2a711aeb71 100644
--- a/gcc/testsuite/gcc.dg/Wstring-literal-comparison-4.c
+++ b/gcc/testsuite/gcc.dg/Wstring-literal-comparison-4.c
@@ -1,6 +1,6 @@
/* PR c/7776 */
/* { dg-do compile } */
-/* { dg-options "-Wall -Wno-string-literal-comparison" } */
+/* { dg-options "-Wall -Wno-address" } */
int test1(char *ptr)
{
diff --git a/gcc/testsuite/gcc.dg/warn-addr-cmp.c b/gcc/testsuite/gcc.dg/warn-addr-cmp.c
index d8c9a219084..6ad94731aff 100644
--- a/gcc/testsuite/gcc.dg/warn-addr-cmp.c
+++ b/gcc/testsuite/gcc.dg/warn-addr-cmp.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-weak "" } */
-/* { dg-options "-Walways-true" } */
+/* { dg-options "-Waddress" } */
/* Warning when addr convert to bool always gives known result.
Ada/Pascal programmers sometimes write 0-param functions without
(), and might as well warn on variables, too. */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c
index 7182168cfc4..21e5fa09c28 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-3.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-3.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-require-alias "" } */
/* { dg-require-weak "" } */
-/* { dg-options "-fno-common -Walways-true" } */
+/* { dg-options "-fno-common -Waddress" } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1a" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1b" } } */