From 308ca868d327f306ac4b87741ed828a56e524fd0 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sat, 19 Jul 2003 13:10:17 +0000 Subject: [PATCH] c-pragma.c (apply_pragma_weak): Don't use warning_with_decl. * c-pragma.c (apply_pragma_weak): Don't use warning_with_decl. * toplev.h (warning): Remove attribute. From-SVN: r69585 --- gcc/ChangeLog | 5 +++++ gcc/c-pragma.c | 3 ++- gcc/toplev.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c81b0d0bd94..769f7f010c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2003-07-19 Gabriel Dos Reis + * c-pragma.c (apply_pragma_weak): Don't use warning_with_decl. + * toplev.h (warning): Remove attribute. + +2003-07-19 Gabriel Dos Reis + * c-decl.c (c_finish_incomplete_decl): Don't use xxx_with_decl. (pop_label_level): Likewise. (duplicate_decls): Likewise. diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index bd53c806dd7..d74e6ff1f84 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -275,7 +275,8 @@ apply_pragma_weak (tree decl, tree value) if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl) && !DECL_WEAK (decl) /* don't complain about a redundant #pragma */ && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) - warning_with_decl (decl, "applying #pragma weak `%s' after first use results in unspecified behavior"); + warning ("%Happlying #pragma weak '%D' after first use results " + "in unspecified behavior", &DECL_SOURCE_LOCATION (decl), decl); declare_weak (decl); } diff --git a/gcc/toplev.h b/gcc/toplev.h index a5d0c532e3a..75bf64c0660 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -55,7 +55,7 @@ extern void _fatal_insn (const char *, rtx, const char *, int, const char *) #endif extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; -extern void warning (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); +extern void warning (const char *, ...); extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; -- 2.11.4.GIT