mirror of git://gcc.gnu.org/git/gcc.git
toplev.h: Add comment about the first parameter for warning().
* 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. From-SVN: r102168
This commit is contained in:
parent
24d36d28c4
commit
b9b8dde302
|
|
@ -1,3 +1,42 @@
|
||||||
|
2005-07-15 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2005-07-19 Danny Berlin <dberlin@dberlin.org>
|
2005-07-19 Danny Berlin <dberlin@dberlin.org>
|
||||||
Kenneth Zadeck <zadeck@naturalbridge.com>
|
Kenneth Zadeck <zadeck@naturalbridge.com>
|
||||||
|
|
||||||
|
|
|
||||||
19
gcc/c-decl.c
19
gcc/c-decl.c
|
|
@ -1908,27 +1908,28 @@ warn_if_shadowing (tree new_decl)
|
||||||
|
|
||||||
if (old_decl == error_mark_node)
|
if (old_decl == error_mark_node)
|
||||||
{
|
{
|
||||||
warning (0, "declaration of %q+D shadows previous non-variable",
|
warning (OPT_Wshadow, "declaration of %q+D shadows previous "
|
||||||
new_decl);
|
"non-variable", new_decl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (TREE_CODE (old_decl) == PARM_DECL)
|
else if (TREE_CODE (old_decl) == PARM_DECL)
|
||||||
warning (0, "declaration of %q+D shadows a parameter", new_decl);
|
warning (OPT_Wshadow, "declaration of %q+D shadows a parameter",
|
||||||
else if (DECL_FILE_SCOPE_P (old_decl))
|
|
||||||
warning (0, "declaration of %q+D shadows a global declaration",
|
|
||||||
new_decl);
|
new_decl);
|
||||||
|
else if (DECL_FILE_SCOPE_P (old_decl))
|
||||||
|
warning (OPT_Wshadow, "declaration of %q+D shadows a global "
|
||||||
|
"declaration", new_decl);
|
||||||
else if (TREE_CODE (old_decl) == FUNCTION_DECL
|
else if (TREE_CODE (old_decl) == FUNCTION_DECL
|
||||||
&& DECL_BUILT_IN (old_decl))
|
&& DECL_BUILT_IN (old_decl))
|
||||||
{
|
{
|
||||||
warning (0, "declaration of %q+D shadows a built-in function",
|
warning (OPT_Wshadow, "declaration of %q+D shadows "
|
||||||
new_decl);
|
"a built-in function", new_decl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
warning (0, "declaration of %q+D shadows a previous local",
|
warning (OPT_Wshadow, "declaration of %q+D shadows a previous local",
|
||||||
new_decl);
|
new_decl);
|
||||||
|
|
||||||
warning (0, "%Jshadowed declaration is here", old_decl);
|
warning (OPT_Wshadow, "%Jshadowed declaration is here", old_decl);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,8 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
|
||||||
name = cpp_token_as_text (pfile, s);
|
name = cpp_token_as_text (pfile, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
warning (0, "%Hignoring #pragma %s %s", &fe_loc, space, name);
|
warning (OPT_Wunknown_pragmas, "%Hignoring #pragma %s %s",
|
||||||
|
&fe_loc, space, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
#include "vec.h"
|
#include "vec.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
#define GCC_BAD(gmsgid) do { warning (0, gmsgid); return; } while (0)
|
#define GCC_BAD(gmsgid) \
|
||||||
|
do { warning (OPT_Wpragmas, gmsgid); return; } while (0)
|
||||||
#define GCC_BAD2(gmsgid, arg) \
|
#define GCC_BAD2(gmsgid, arg) \
|
||||||
do { warning (0, gmsgid, arg); return; } while (0)
|
do { warning (OPT_Wpragmas, gmsgid, arg); return; } while (0)
|
||||||
|
|
||||||
typedef struct align_stack GTY(())
|
typedef struct align_stack GTY(())
|
||||||
{
|
{
|
||||||
|
|
@ -110,7 +111,7 @@ pop_alignment (tree id)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
warning (0, "\
|
warning (OPT_Wpragmas, "\
|
||||||
#pragma pack(pop, %s) encountered without matching #pragma pack(push, %s)"
|
#pragma pack(pop, %s) encountered without matching #pragma pack(push, %s)"
|
||||||
, IDENTIFIER_POINTER (id), IDENTIFIER_POINTER (id));
|
, IDENTIFIER_POINTER (id), IDENTIFIER_POINTER (id));
|
||||||
}
|
}
|
||||||
|
|
@ -203,7 +204,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
|
||||||
GCC_BAD ("malformed %<#pragma pack%> - ignored");
|
GCC_BAD ("malformed %<#pragma pack%> - ignored");
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
if (c_lex (&x) != CPP_EOF)
|
||||||
warning (0, "junk at end of %<#pragma pack%>");
|
warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>");
|
||||||
|
|
||||||
if (flag_pack_struct)
|
if (flag_pack_struct)
|
||||||
GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored");
|
GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored");
|
||||||
|
|
@ -259,8 +260,8 @@ apply_pragma_weak (tree decl, tree value)
|
||||||
if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl)
|
if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl)
|
||||||
&& !DECL_WEAK (decl) /* Don't complain about a redundant #pragma. */
|
&& !DECL_WEAK (decl) /* Don't complain about a redundant #pragma. */
|
||||||
&& TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
|
&& TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
|
||||||
warning (0, "applying #pragma weak %q+D after first use results "
|
warning (OPT_Wpragmas, "applying #pragma weak %q+D after first use "
|
||||||
"in unspecified behavior", decl);
|
"results in unspecified behavior", decl);
|
||||||
|
|
||||||
declare_weak (decl);
|
declare_weak (decl);
|
||||||
}
|
}
|
||||||
|
|
@ -342,7 +343,7 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy))
|
||||||
t = c_lex (&x);
|
t = c_lex (&x);
|
||||||
}
|
}
|
||||||
if (t != CPP_EOF)
|
if (t != CPP_EOF)
|
||||||
warning (0, "junk at end of #pragma weak");
|
warning (OPT_Wpragmas, "junk at end of #pragma weak");
|
||||||
|
|
||||||
decl = identifier_global_value (name);
|
decl = identifier_global_value (name);
|
||||||
if (decl && DECL_P (decl))
|
if (decl && DECL_P (decl))
|
||||||
|
|
@ -415,7 +416,7 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy))
|
||||||
GCC_BAD ("malformed #pragma redefine_extname, ignored");
|
GCC_BAD ("malformed #pragma redefine_extname, ignored");
|
||||||
t = c_lex (&x);
|
t = c_lex (&x);
|
||||||
if (t != CPP_EOF)
|
if (t != CPP_EOF)
|
||||||
warning (0, "junk at end of #pragma redefine_extname");
|
warning (OPT_Wpragmas, "junk at end of #pragma redefine_extname");
|
||||||
|
|
||||||
if (!flag_mudflap && !targetm.handle_pragma_redefine_extname)
|
if (!flag_mudflap && !targetm.handle_pragma_redefine_extname)
|
||||||
{
|
{
|
||||||
|
|
@ -438,8 +439,8 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy))
|
||||||
name = targetm.strip_name_encoding (name);
|
name = targetm.strip_name_encoding (name);
|
||||||
|
|
||||||
if (strcmp (name, IDENTIFIER_POINTER (newname)))
|
if (strcmp (name, IDENTIFIER_POINTER (newname)))
|
||||||
warning (0, "#pragma redefine_extname ignored due to conflict with "
|
warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
|
||||||
"previous rename");
|
"conflict with previous rename");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
change_decl_assembler_name (decl, newname);
|
change_decl_assembler_name (decl, newname);
|
||||||
|
|
@ -461,8 +462,8 @@ add_to_renaming_pragma_list (tree oldname, tree newname)
|
||||||
if (previous)
|
if (previous)
|
||||||
{
|
{
|
||||||
if (TREE_VALUE (previous) != newname)
|
if (TREE_VALUE (previous) != newname)
|
||||||
warning (0, "#pragma redefine_extname ignored due to conflict with "
|
warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
|
||||||
"previous #pragma redefine_extname");
|
"conflict with previous #pragma redefine_extname");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -483,7 +484,7 @@ handle_pragma_extern_prefix (cpp_reader * ARG_UNUSED (dummy))
|
||||||
GCC_BAD ("malformed #pragma extern_prefix, ignored");
|
GCC_BAD ("malformed #pragma extern_prefix, ignored");
|
||||||
t = c_lex (&x);
|
t = c_lex (&x);
|
||||||
if (t != CPP_EOF)
|
if (t != CPP_EOF)
|
||||||
warning (0, "junk at end of #pragma extern_prefix");
|
warning (OPT_Wpragmas, "junk at end of #pragma extern_prefix");
|
||||||
|
|
||||||
if (targetm.handle_pragma_extern_prefix)
|
if (targetm.handle_pragma_extern_prefix)
|
||||||
/* Note that the length includes the null terminator. */
|
/* Note that the length includes the null terminator. */
|
||||||
|
|
@ -516,7 +517,7 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
|
||||||
oldname = targetm.strip_name_encoding (oldname);
|
oldname = targetm.strip_name_encoding (oldname);
|
||||||
|
|
||||||
if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldname))
|
if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldname))
|
||||||
warning (0, "asm declaration ignored due to "
|
warning (OPT_Wpragmas, "asm declaration ignored due to "
|
||||||
"conflict with previous rename");
|
"conflict with previous rename");
|
||||||
|
|
||||||
/* Take any pending redefine_extname off the list. */
|
/* Take any pending redefine_extname off the list. */
|
||||||
|
|
@ -525,7 +526,7 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
|
||||||
{
|
{
|
||||||
/* Only warn if there is a conflict. */
|
/* Only warn if there is a conflict. */
|
||||||
if (strcmp (IDENTIFIER_POINTER (TREE_VALUE (t)), oldname))
|
if (strcmp (IDENTIFIER_POINTER (TREE_VALUE (t)), oldname))
|
||||||
warning (0, "#pragma redefine_extname ignored due to "
|
warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
|
||||||
"conflict with previous rename");
|
"conflict with previous rename");
|
||||||
|
|
||||||
*p = TREE_CHAIN (t);
|
*p = TREE_CHAIN (t);
|
||||||
|
|
@ -547,7 +548,7 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
|
||||||
{
|
{
|
||||||
if (strcmp (TREE_STRING_POINTER (asmname),
|
if (strcmp (TREE_STRING_POINTER (asmname),
|
||||||
IDENTIFIER_POINTER (newname)) != 0)
|
IDENTIFIER_POINTER (newname)) != 0)
|
||||||
warning (0, "#pragma redefine_extname ignored due to "
|
warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
|
||||||
"conflict with __asm__ declaration");
|
"conflict with __asm__ declaration");
|
||||||
return asmname;
|
return asmname;
|
||||||
}
|
}
|
||||||
|
|
@ -661,7 +662,7 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c_lex (&x) != CPP_EOF)
|
if (c_lex (&x) != CPP_EOF)
|
||||||
warning (0, "junk at end of %<#pragma GCC visibility%>");
|
warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,10 @@ Wpointer-to-int-cast
|
||||||
C ObjC Var(warn_pointer_to_int_cast) Init(1)
|
C ObjC Var(warn_pointer_to_int_cast) Init(1)
|
||||||
Warn when a pointer is cast to an integer of a different size
|
Warn when a pointer is cast to an integer of a different size
|
||||||
|
|
||||||
|
Wpragmas
|
||||||
|
C ObjC C++ ObjC++ Var(warn_pragmas) Init(1)
|
||||||
|
Warn about misuses of pragmas
|
||||||
|
|
||||||
Wprotocol
|
Wprotocol
|
||||||
ObjC ObjC++ Var(warn_protocol) Init(1)
|
ObjC ObjC++ Var(warn_protocol) Init(1)
|
||||||
Warn if inherited methods are unimplemented
|
Warn if inherited methods are unimplemented
|
||||||
|
|
|
||||||
|
|
@ -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
|
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,
|
pragma doesn't take a section string. Returns 0 for a good pragma,
|
||||||
-1 for a malformed 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
|
static int
|
||||||
c4x_parse_pragma (name, func, sect)
|
c4x_parse_pragma (name, func, sect)
|
||||||
|
|
@ -86,7 +87,7 @@ c4x_parse_pragma (name, func, sect)
|
||||||
BAD ("missing ')' for '#pragma %s' - ignored", name);
|
BAD ("missing ')' for '#pragma %s' - ignored", name);
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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;
|
*func = f;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ ia64_hpux_handle_builtin_pragma (cpp_reader *pfile ATTRIBUTE_UNUSED)
|
||||||
type = c_lex (&x);
|
type = c_lex (&x);
|
||||||
}
|
}
|
||||||
if (type != CPP_EOF)
|
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
|
/* List of standard math functions which do not set matherr by default
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ static tree altivec_resolve_overloaded_builtin (tree, tree);
|
||||||
attribute by default. */
|
attribute by default. */
|
||||||
|
|
||||||
#define SYNTAX_ERROR(gmsgid) do { \
|
#define SYNTAX_ERROR(gmsgid) do { \
|
||||||
warning (0, gmsgid); \
|
warning (OPT_Wpragmas, gmsgid); \
|
||||||
warning (0, "ignoring malformed #pragma longcall"); \
|
warning (OPT_Wpragmas, "ignoring malformed #pragma longcall"); \
|
||||||
return; \
|
return; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED)
|
||||||
SYNTAX_ERROR ("number must be 0 or 1");
|
SYNTAX_ERROR ("number must be 0 or 1");
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
rs6000_default_long_calls = (n == integer_one_node);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,11 @@ static int
|
||||||
pop_data_area (v850_data_area data_area)
|
pop_data_area (v850_data_area data_area)
|
||||||
{
|
{
|
||||||
if (data_area_stack == NULL)
|
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)
|
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
|
else
|
||||||
{
|
{
|
||||||
data_area_stack_element * elem;
|
data_area_stack_element * elem;
|
||||||
|
|
@ -144,7 +146,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
if (type == CPP_COMMA)
|
if (type == CPP_COMMA)
|
||||||
repeat = 1;
|
repeat = 1;
|
||||||
else if (type != CPP_EOF)
|
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;
|
if (streq (sect, "data")) kind = GHS_SECTION_KIND_DATA;
|
||||||
else if (streq (sect, "text")) kind = GHS_SECTION_KIND_TEXT;
|
else if (streq (sect, "text")) kind = GHS_SECTION_KIND_TEXT;
|
||||||
|
|
@ -176,7 +178,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
warning (0, "malformed #pragma ghs section");
|
warning (OPT_Wpragmas, "malformed #pragma ghs section");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
reset:
|
reset:
|
||||||
|
|
@ -195,7 +197,7 @@ ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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 ();
|
mark_current_function_as_interrupt ();
|
||||||
}
|
}
|
||||||
|
|
@ -206,7 +208,7 @@ ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
push_data_area (DATA_AREA_TDA);
|
||||||
}
|
}
|
||||||
|
|
@ -217,7 +219,7 @@ ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
push_data_area (DATA_AREA_SDA);
|
||||||
}
|
}
|
||||||
|
|
@ -228,7 +230,7 @@ ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
push_data_area (DATA_AREA_ZDA);
|
||||||
}
|
}
|
||||||
|
|
@ -239,7 +241,7 @@ ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
pop_data_area (DATA_AREA_TDA);
|
||||||
}
|
}
|
||||||
|
|
@ -250,7 +252,7 @@ ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
pop_data_area (DATA_AREA_SDA);
|
||||||
}
|
}
|
||||||
|
|
@ -261,7 +263,7 @@ ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
|
||||||
tree x;
|
tree x;
|
||||||
|
|
||||||
if (c_lex (&x) != CPP_EOF)
|
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);
|
pop_data_area (DATA_AREA_ZDA);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||||
-Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 @gol
|
-Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 @gol
|
||||||
-Wswitch -Wswitch-default -Wswitch-enum @gol
|
-Wswitch -Wswitch-default -Wswitch-enum @gol
|
||||||
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
|
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
|
||||||
-Wunknown-pragmas -Wunreachable-code @gol
|
-Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
|
||||||
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
|
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
|
||||||
-Wunused-value -Wunused-variable -Wwrite-strings @gol
|
-Wunused-value -Wunused-variable -Wwrite-strings @gol
|
||||||
-Wvariadic-macros}
|
-Wvariadic-macros}
|
||||||
|
|
@ -2709,6 +2709,13 @@ GCC@. If this command line option is used, warnings will even be issued
|
||||||
for unknown pragmas in system header files. This is not the case if
|
for unknown pragmas in system header files. This is not the case if
|
||||||
the warnings were only enabled by the @option{-Wall} command line option.
|
the warnings were only enabled by the @option{-Wall} command line option.
|
||||||
|
|
||||||
|
@item -Wno-pragmas
|
||||||
|
@opindex Wno-pragmas
|
||||||
|
@opindex Wpragmas
|
||||||
|
Do not warn about misuses of pragmas, such as incorrect parameters,
|
||||||
|
invalid syntax, or conflicts between pragmas. See also
|
||||||
|
@samp{-Wunknown-pragmas}.
|
||||||
|
|
||||||
@item -Wstrict-aliasing
|
@item -Wstrict-aliasing
|
||||||
@opindex Wstrict-aliasing
|
@opindex Wstrict-aliasing
|
||||||
This option is only active when @option{-fstrict-aliasing} is active.
|
This option is only active when @option{-fstrict-aliasing} is active.
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
#ifndef GCC_ERRORS_H
|
#ifndef GCC_ERRORS_H
|
||||||
#define GCC_ERRORS_H
|
#define GCC_ERRORS_H
|
||||||
|
|
||||||
|
/* The first parameter is for compatibility with the non-generator
|
||||||
|
version of warning(). For those, you'd pass an OPT_W* value from
|
||||||
|
options.h, but in generator programs it has no effect, so it's OK
|
||||||
|
to just pass zero for calls from generator-only files. */
|
||||||
extern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2;
|
extern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2;
|
||||||
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
|
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||||
extern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1;
|
extern void fatal (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1;
|
||||||
|
|
|
||||||
|
|
@ -4315,7 +4315,7 @@ do_warn_unused_parameter (tree fn)
|
||||||
decl; decl = TREE_CHAIN (decl))
|
decl; decl = TREE_CHAIN (decl))
|
||||||
if (!TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL
|
if (!TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL
|
||||||
&& DECL_NAME (decl) && !DECL_ARTIFICIAL (decl))
|
&& DECL_NAME (decl) && !DECL_ARTIFICIAL (decl))
|
||||||
warning (0, "unused parameter %q+D", decl);
|
warning (OPT_Wunused_parameter, "unused parameter %q+D", decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GTY(()) rtx initial_trampoline;
|
static GTY(()) rtx initial_trampoline;
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ extern void _fatal_insn (const char *, rtx, const char *, int, const char *)
|
||||||
extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
|
extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
|
||||||
ATTRIBUTE_NORETURN;
|
ATTRIBUTE_NORETURN;
|
||||||
extern void warning0 (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
|
extern void warning0 (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
|
||||||
|
/* Pass one of the OPT_W* from options.h as the first parameter. */
|
||||||
extern void warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
|
extern void warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
|
||||||
extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
|
extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
|
||||||
extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
|
extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue