* common.opt (Wmudflap): New option.
* tree-mudflap.c (mf_xform_derefs_1): Guard warning by OPT_Wmudflap.
(mx_register_decls): Likewise.
(mudflap_finish_file): Likewise.
* doc/invoke.texi: Document -Wno-mudflap.
* testsuite/libmudflap.c/pass63-frag.c: New test.
From-SVN: r133385
-2008-03-20 Kai Tietz <kai.tietz@onevision.com>
+2008-03-20 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * common.opt (Wmudflap): New option.
+ * tree-mudflap.c (mf_xform_derefs_1): Guard warning by OPT_Wmudflap.
+ (mx_register_decls): Likewise.
+ (mudflap_finish_file): Likewise.
+ * doc/invoke.texi: Document -Wno-mudflap.
+
+2008-03-20 Kai Tietz <kai.tietz@onevision.com>
* c-format.c (replace_format_name_to_system_name): New.
(cmp_attribs): New.
Common Var(warn_missing_noreturn) Warning
Warn about functions which might be candidates for __attribute__((noreturn))
+Wmudflap
+Common Var(warn_mudflap) Init(1) Warning
+Warn about constructs not instrumented by -fmudflap
+
Woverflow
Common Var(warn_overflow) Init(1) Warning
Warn about overflow in arithmetic expressions
-Wlogical-op -Wlong-long @gol
-Wmain -Wmissing-braces -Wmissing-field-initializers @gol
-Wmissing-format-attribute -Wmissing-include-dirs @gol
--Wmissing-noreturn @gol
+-Wmissing-noreturn -Wno-mudflap @gol
-Wno-multichar -Wnonnull -Wno-overflow @gol
-Woverlength-strings -Wpacked -Wpadded @gol
-Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast @gol
This option is only active when @option{-fstack-protector} is active. It
warns about functions that will not be protected against stack smashing.
+@item -Wno-mudflap
+@opindex Wno-mudflap
+Suppress warnings about constructs that cannot be instrumented by
+@option{-fmudflap}.
+
@item -Woverlength-strings
@opindex Woverlength-strings
@opindex Wno-overlength-strings
break;
case ARRAY_RANGE_REF:
- warning (0, "mudflap checking not yet implemented for ARRAY_RANGE_REF");
+ warning (OPT_Wmudflap,
+ "mudflap checking not yet implemented for ARRAY_RANGE_REF");
return;
case BIT_FIELD_REF:
if (tsi_end_p (initially_stmts))
{
if (!DECL_ARTIFICIAL (decl))
- warning (0, "mudflap cannot track %qs in stub function",
+ warning (OPT_Wmudflap,
+ "mudflap cannot track %qs in stub function",
IDENTIFIER_POINTER (DECL_NAME (decl)));
}
else
if (! COMPLETE_TYPE_P (TREE_TYPE (obj)))
{
- warning (0, "mudflap cannot track unknown size extern %qs",
+ warning (OPT_Wmudflap,
+ "mudflap cannot track unknown size extern %qs",
IDENTIFIER_POINTER (DECL_NAME (obj)));
continue;
}
+2008-03-20 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * testsuite/libmudflap.c/pass63-frag.c: New test.
+
2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* aclocal.m4: Regenerate.
--- /dev/null
+/* Check -Wno-mudflap flag */
+/* { dg-do compile } */
+/* { dg-options "-fmudflap -Wno-mudflap" } */
+
+extern char x[];
+int main() { return x[3]; } /* { dg-bogus "mudflap cannot track" } */