diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-09-07 22:24:34 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-09-07 22:24:34 +0000 |
commit | 8b97c5f8ef218afce7499abe8cd3e6eb1f729306 (patch) | |
tree | a9b9cd034b9b3c1cc173cb5e609c95a9d4411d72 /gcc/c-pragma.c | |
parent | 1898584f04c8d512f9ed50de977cc266fc2a3b15 (diff) | |
download | gcc-8b97c5f8ef218afce7499abe8cd3e6eb1f729306.zip gcc-8b97c5f8ef218afce7499abe8cd3e6eb1f729306.tar.gz gcc-8b97c5f8ef218afce7499abe8cd3e6eb1f729306.tar.bz2 |
c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined.
* c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if
REGISTER_TARGET_PRAGMAS is defined. Duplicate some
definitions from cpplib.h.
* cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has
already done it.
* tm.texi: Document HANDLE_PRAGMA as no longer supported. Add
documentation for REGISTER_TARGET_PRAGMAS.
* c-lex.c: Include cpplib.h before c-pragma.h. Define a
default-pragma callback to implement -Wunknown-pragmas if
USE_CPPLIB.
* c-parse.in: Move all includes to top of file.
* c-pragma.c: Include cpplib.h before c-pragma.h. Include
tm_p.h.
(dispatch_pragma): Put the namespace in the -Wunknown-pragmas
warning.
(init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it.
* arm.h, arm-protos.h, arm.c,
c4x.h, c4x-protos.h, c4x.c,
h8300.h, h8300-protos.h, h8300.c,
i370.h, i370-protos.h, i370.c,
i960.h, i960-protos.h, i960.c,
sh.h, sh-protos.h, sh.c,
v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based
pragmata scheme to use REGISTER_TARGET_PRAGMAS instead.
* d30v.h: Don't mention HANDLE_PRAGMA in comment. Add
multiple include guard.
* i370.md (untyped_call): Use GEN_CALL.
(umodsi3): Remove unused variable.
* sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA.
* v850.c (output_move_single, output_move_double): Constify
return value.
(print_operand): Constify a char *.
* v850.h (struct small_memory_info): Constify name member.
From-SVN: r36249
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r-- | gcc/c-pragma.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index 2d6bee8..820720d 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -24,12 +24,13 @@ Boston, MA 02111-1307, USA. */ #include "tree.h" #include "function.h" #include "defaults.h" +#include "cpplib.h" #include "c-pragma.h" #include "flags.h" #include "toplev.h" #include "ggc.h" #include "c-lex.h" -#include "cpplib.h" +#include "tm_p.h" #ifdef HANDLE_GENERIC_PRAGMAS @@ -383,7 +384,7 @@ dispatch_pragma () enum cpp_ttype t; tree x; const struct pragma_entry *p; - const char *name; + const char *name, *space = 0; size_t len; p = pragmas; @@ -407,6 +408,7 @@ dispatch_pragma () { if (p->isnspace) { + space = p->name; p = p->u.space; goto new_space; } @@ -420,10 +422,15 @@ dispatch_pragma () } /* Issue a warning message if we have been asked to do so. Ignore - unknown pragmas in system header file unless an explcit + unknown pragmas in system headers unless an explicit -Wunknown-pragmas has been given. */ if (warn_unknown_pragmas > in_system_header) - warning ("ignoring pragma %s", name); + { + if (space) + warning ("ignoring #pragma %s %s", space, name); + else + warning ("ignoring #pragma %s", name); + } } #endif @@ -444,6 +451,10 @@ init_pragma () cpp_register_pragma (pfile, 0, "weak", handle_pragma_weak); #endif +#ifdef REGISTER_TARGET_PRAGMAS + REGISTER_TARGET_PRAGMAS (pfile); +#endif + #ifdef HANDLE_PRAGMA_PACK_PUSH_POP ggc_add_root (&alignment_stack, 1, sizeof(alignment_stack), mark_align_stack); |