From 10c1b9f6899886fade41f1fc8c896d7143c4c18c Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 13 Apr 1997 12:49:07 -0400 Subject: [PATCH] (warn_undef): New variable. (main): Set warn_undef from -Wundef and -Wno-undef. From-SVN: r13876 --- gcc/cccp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/cccp.c b/gcc/cccp.c index cd02b59bcad..5baa257d282 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -452,6 +452,10 @@ static int warn_stringify; static int warn_trigraphs; +/* Nonzero means warn if undefined identifiers are evaluated in an #if. */ + +int warn_undef; + /* Nonzero means warn if #import is used. */ static int warn_import = 1; @@ -1546,6 +1550,10 @@ main (argc, argv) warn_stringify = 1; else if (!strcmp (argv[i], "-Wno-traditional")) warn_stringify = 0; + else if (!strcmp (argv[i], "-Wundef")) + warn_undef = 1; + else if (!strcmp (argv[i], "-Wno-undef")) + warn_undef = 0; else if (!strcmp (argv[i], "-Wimport")) warn_import = 1; else if (!strcmp (argv[i], "-Wno-import"))