summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-19 20:19:16 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-19 20:19:16 +0000
commite8d0745df96e4d0f620210f349192f65bdd4f5a5 (patch)
tree1c8849b78f20cc8bc1516f5d7faf8239837a6fcb /gcc/config
parente2c1060c5b94d814a2409748e146d96da1dbdd02 (diff)
downloadgcc-e8d0745df96e4d0f620210f349192f65bdd4f5a5.tar.gz
* toplev.h: Add comment about the first parameter for warning().
* errors.h: Likewise. * c.opt (Wpragmas): New. * doc/invoke.texi: Document it. * function.c (do_warn_unused_parameter): Add warning control to warning call. * c-decl.c (warn_if_shadowing): Likewise. * c-lex.c (cb_def_pragma): Likewise. * c-pragma.c (GCC_BAD, GCC_BAD2): Likewise. (pop_alignment): Likewise. (handle_pragma_pack): Likewise. (apply_pragma_weak): Likewise. (handle_pragma_weak): Likewise. (handle_pragma_redefine_extname): Likewise. (add_to_renaming_pragma_list): Likewise. (handle_pragma_extern_prefix): Likewise. (maybe_apply_renaming_pragma): Likewise. (handle_pragma_visibility): Likewise. * config/c4x/c4x-c.c (BAD): Likewise. (c4x_parse_pragma): Likewise. * config/ia64/ia64-c.c (ia64_hpux_handle_builtin_pragma): Likewise. * config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise. (rs6000_pragma_longcall): Likewise. * config/v850/v850-c.c (pop_data_area): Likewise. (ghs_pragma_section): Likewise. (ghs_pragma_section): Likewise. (ghs_pragma_interrupt): Likewise. (ghs_pragma_starttda): Likewise. (ghs_pragma_startsda): Likewise. (ghs_pragma_startzda): Likewise. (ghs_pragma_endtda): Likewise. (ghs_pragma_endsda): Likewise. (ghs_pragma_endzda): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/c4x/c4x-c.c5
-rw-r--r--gcc/config/ia64/ia64-c.c2
-rw-r--r--gcc/config/rs6000/rs6000-c.c10
-rw-r--r--gcc/config/v850/v850-c.c24
4 files changed, 22 insertions, 19 deletions
diff --git a/gcc/config/c4x/c4x-c.c b/gcc/config/c4x/c4x-c.c
index 644fe866ac5..fe3a9222981 100644
--- a/gcc/config/c4x/c4x-c.c
+++ b/gcc/config/c4x/c4x-c.c
@@ -57,7 +57,8 @@ static int c4x_parse_pragma (const char *, tree *, tree *);
the STRING_CST node of the string. If SECT is null, then this
pragma doesn't take a section string. Returns 0 for a good pragma,
-1 for a malformed pragma. */
-#define BAD(gmsgid, arg) do { warning (0, gmsgid, arg); return -1; } while (0)
+#define BAD(gmsgid, arg) \
+ do { warning (OPT_Wpragmas, gmsgid, arg); return -1; } while (0)
static int
c4x_parse_pragma (name, func, sect)
@@ -86,7 +87,7 @@ c4x_parse_pragma (name, func, sect)
BAD ("missing ')' for '#pragma %s' - ignored", name);
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of '#pragma %s'", name);
+ warning (OPT_Wpragmas, "junk at end of '#pragma %s'", name);
*func = f;
return 0;
diff --git a/gcc/config/ia64/ia64-c.c b/gcc/config/ia64/ia64-c.c
index d29d15a3f9b..d51a98d6ebc 100644
--- a/gcc/config/ia64/ia64-c.c
+++ b/gcc/config/ia64/ia64-c.c
@@ -49,7 +49,7 @@ ia64_hpux_handle_builtin_pragma (cpp_reader *pfile ATTRIBUTE_UNUSED)
type = c_lex (&x);
}
if (type != CPP_EOF)
- warning (0, "malformed #pragma builtin");
+ warning (OPT_Wpragmas, "malformed #pragma builtin");
}
/* List of standard math functions which do not set matherr by default
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index 1e851e45b2c..c125c782951 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -50,10 +50,10 @@ static tree altivec_resolve_overloaded_builtin (tree, tree);
whether or not new function declarations receive a longcall
attribute by default. */
-#define SYNTAX_ERROR(gmsgid) do { \
- warning (0, gmsgid); \
- warning (0, "ignoring malformed #pragma longcall"); \
- return; \
+#define SYNTAX_ERROR(gmsgid) do { \
+ warning (OPT_Wpragmas, gmsgid); \
+ warning (OPT_Wpragmas, "ignoring malformed #pragma longcall"); \
+ return; \
} while (0)
void
@@ -75,7 +75,7 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED)
SYNTAX_ERROR ("number must be 0 or 1");
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma longcall");
+ warning (OPT_Wpragmas, "junk at end of #pragma longcall");
rs6000_default_long_calls = (n == integer_one_node);
}
diff --git a/gcc/config/v850/v850-c.c b/gcc/config/v850/v850-c.c
index a7acf99fd51..cbb86cdd426 100644
--- a/gcc/config/v850/v850-c.c
+++ b/gcc/config/v850/v850-c.c
@@ -64,9 +64,11 @@ static int
pop_data_area (v850_data_area data_area)
{
if (data_area_stack == NULL)
- warning (0, "#pragma GHS endXXXX found without previous startXXX");
+ warning (OPT_Wpragmas, "#pragma GHS endXXXX found without "
+ "previous startXXX");
else if (data_area != data_area_stack->data_area)
- warning (0, "#pragma GHS endXXX does not match previous startXXX");
+ warning (OPT_Wpragmas, "#pragma GHS endXXX does not match "
+ "previous startXXX");
else
{
data_area_stack_element * elem;
@@ -144,7 +146,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
if (type == CPP_COMMA)
repeat = 1;
else if (type != CPP_EOF)
- warning (0, "junk at end of #pragma ghs section");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs section");
if (streq (sect, "data")) kind = GHS_SECTION_KIND_DATA;
else if (streq (sect, "text")) kind = GHS_SECTION_KIND_TEXT;
@@ -176,7 +178,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
return;
bad:
- warning (0, "malformed #pragma ghs section");
+ warning (OPT_Wpragmas, "malformed #pragma ghs section");
return;
reset:
@@ -195,7 +197,7 @@ ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs interrupt");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs interrupt");
mark_current_function_as_interrupt ();
}
@@ -206,7 +208,7 @@ ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs starttda");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs starttda");
push_data_area (DATA_AREA_TDA);
}
@@ -217,7 +219,7 @@ ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs startsda");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs startsda");
push_data_area (DATA_AREA_SDA);
}
@@ -228,7 +230,7 @@ ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs startzda");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs startzda");
push_data_area (DATA_AREA_ZDA);
}
@@ -239,7 +241,7 @@ ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs endtda");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs endtda");
pop_data_area (DATA_AREA_TDA);
}
@@ -250,7 +252,7 @@ ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs endsda");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs endsda");
pop_data_area (DATA_AREA_SDA);
}
@@ -261,7 +263,7 @@ ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
tree x;
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of #pragma ghs endzda");
+ warning (OPT_Wpragmas, "junk at end of #pragma ghs endzda");
pop_data_area (DATA_AREA_ZDA);
}