aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorMatt Austern <austern@apple.com>2003-05-19 19:19:46 +0000
committerMatt Austern <austern@gcc.gnu.org>2003-05-19 19:19:46 +0000
commita01fff59e70fba464453852c561213c3a24fb2c7 (patch)
treedb823fd432e76eee10d350bcaede94deebaa3066 /gcc/c-opts.c
parenteab1ff73c813a9eb0f7e6e8c784d8d41b37af687 (diff)
downloadgcc-a01fff59e70fba464453852c561213c3a24fb2c7.zip
gcc-a01fff59e70fba464453852c561213c3a24fb2c7.tar.gz
gcc-a01fff59e70fba464453852c561213c3a24fb2c7.tar.bz2
Add a new flag...
Add a new flag, -W(no-)invalid-offsetof, to control whether or not the compiler warns about incorrect use of the offsetof macro in C++. By default the warning is on. From-SVN: r66972
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index e2722b3..49189c4 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -203,6 +203,7 @@ static void finish_options PARAMS ((void));
OPT("Wimplicit-function-declaration", CL_C, OPT_Wimplicit_function_decl) \
OPT("Wimplicit-int", CL_C, OPT_Wimplicit_int) \
OPT("Wimport", CL_ALL, OPT_Wimport) \
+ OPT("Winvalid-offsetof", CL_CXX, OPT_Winvalid_offsetof) \
OPT("Winvalid-pch", CL_ALL, OPT_Winvalid_pch) \
OPT("Wlong-long", CL_ALL, OPT_Wlong_long) \
OPT("Wmain", CL_C, OPT_Wmain) \
@@ -942,6 +943,10 @@ c_common_decode_option (argc, argv)
cpp_opts->warn_import = on;
break;
+ case OPT_Winvalid_offsetof:
+ warn_invalid_offsetof = on;
+ break;
+
case OPT_Winvalid_pch:
cpp_opts->warn_invalid_pch = on;
break;