diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2003-03-14 21:47:50 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-03-14 21:47:50 +0000 |
commit | 23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6 (patch) | |
tree | f86d032aa7796736ae3b48b9d527b9b116caa900 /gcc/cppmacro.c | |
parent | 98d2dec7e3268ca0baee90e2d89da4d75fe4c193 (diff) | |
download | gcc-23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6.zip gcc-23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6.tar.gz gcc-23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6.tar.bz2 |
/home/neil/diffs/include.log
From-SVN: r64373
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 99043ff..94fa858 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -1,6 +1,6 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -89,8 +89,6 @@ _cpp_warn_if_unused_macro (pfile, node, v) cpp_macro *macro = node->value.macro; if (!macro->used - /* Skip front-end built-ins and command line macros. */ - && macro->line >= pfile->first_unused_line && MAIN_FILE_P (lookup_line (&pfile->line_maps, macro->line))) cpp_error_with_line (pfile, DL_WARNING, macro->line, 0, "macro \"%s\" is not used", NODE_NAME (node)); @@ -1568,7 +1566,7 @@ _cpp_create_definition (pfile, node) macro->params = 0; macro->paramc = 0; macro->variadic = 0; - macro->used = 0; + macro->used = !CPP_OPTION (pfile, warn_unused_macros); macro->count = 0; macro->fun_like = 0; /* To suppress some diagnostics. */ |