aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2012-05-03 22:28:21 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2012-05-03 22:28:21 +0000
commit0c3641b0ea030a15cc2b61bdd0d4e200086243e5 (patch)
treebd6e929d7b61a7f36eb09c0a4cb029426263e066
parentd333c3ebce0df3f2c4d976698bea0d96642a2ead (diff)
downloadgcc-0c3641b0ea030a15cc2b61bdd0d4e200086243e5.zip
gcc-0c3641b0ea030a15cc2b61bdd0d4e200086243e5.tar.gz
gcc-0c3641b0ea030a15cc2b61bdd0d4e200086243e5.tar.bz2
flags.h (flag_permissive): Do not declare.
2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org> gcc/ * flags.h (flag_permissive): Do not declare. * diagnostic.c (diagnostic_report_diagnostic): Handle fpermissive option specially. * toplev.c (flag_permissive): Do not define. * c-tree.h (system_header_p): Delete unused. c-family/ * c.opt (fpermissive): Add Var(flag_permissive). From-SVN: r187123
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c.opt2
-rw-r--r--gcc/c-tree.h4
-rw-r--r--gcc/diagnostic.c3
-rw-r--r--gcc/flags.h3
-rw-r--r--gcc/toplev.c4
7 files changed, 15 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a310e38..8bd4101 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * flags.h (flag_permissive): Do not declare.
+ * diagnostic.c (diagnostic_report_diagnostic): Handle fpermissive
+ option specially.
+ * toplev.c (flag_permissive): Do not define.
+ * c-tree.h (system_header_p): Delete unused.
+
2012-05-03 David S. Miller <davem@davemloft.net>
PR target/52684
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 7bd6ad7..05c2c75 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * c.opt (fpermissive): Add Var(flag_permissive).
+
2012-04-30 Marc Glisse <marc.glisse@inria.fr>
PR c++/51033
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index d2cf6ee..e0c166c 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -982,7 +982,7 @@ C ObjC C++ ObjC++
Look for and use PCH files even when preprocessing
fpermissive
-C++ ObjC++
+C++ ObjC++ Var(flag_permissive)
Downgrade conformance errors to warnings
fplan9-extensions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index db60935..468cfe4 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -621,10 +621,6 @@ extern int current_function_returns_null;
extern int current_function_returns_abnormally;
-/* Nonzero means we are reading code that came from a system header file. */
-
-extern int system_header_p;
-
/* Mode used to build pointers (VOIDmode means ptr_mode). */
extern enum machine_mode c_default_pointer_mode;
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 729e865..1e2712e 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -542,7 +542,8 @@ diagnostic_report_diagnostic (diagnostic_context *context,
diagnostic->kind = DK_ERROR;
}
- if (diagnostic->option_index)
+ if (diagnostic->option_index
+ && diagnostic->option_index != permissive_error_option (context))
{
diagnostic_t diag_class = DK_UNSPECIFIED;
diff --git a/gcc/flags.h b/gcc/flags.h
index 9791e1b..48c20e5 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -53,9 +53,6 @@ extern void set_Wstrict_aliasing (struct gcc_options *opts, int onoff);
extern bool final_insns_dump_p;
-/* Nonzero means make permerror produce warnings instead of errors. */
-
-extern int flag_permissive;
/* Other basic status info about current function. */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index d9aaa42..a2845ab 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -145,10 +145,6 @@ HOST_WIDE_INT random_seed;
/* -f flags. */
-/* Nonzero means make permerror produce warnings instead of errors. */
-
-int flag_permissive = 0;
-
/* When non-NULL, indicates that whenever space is allocated on the
stack, the resulting stack pointer must not pass this
address---that is, for stacks that grow downward, the stack pointer