Date: Mon, 27 Jun 2011 14:15:59 -0700 (PDT) From: "Pedro F. Giffuni" <giffunip@tutopia.com> To: uqs@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: gnu/157019: [patch] gcc(1): Add some warnings from OpenBSD gcc and fix a typo. Message-ID: <1309209359.55151.YahooMailClassic@web113508.mail.gq1.yahoo.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
--- On Mon, 6/27/11, uqs@FreeBSD.org <uqs@FreeBSD.org> wrote:
> Hello Pedro,
>
> the patch you attached is incomplete/malformed. Could you
> please regenerate and re-send?
>
Oops, sorry, it was a small newline mismatch.
New patch attached.
regards,
Pedro.
[-- Attachment #2 --]
--- gcc/c-decl.c.orig 2011-03-23 17:06:23.000000000 +0000
+++ gcc/c-decl.c 2011-06-27 16:00:47.000000000 +0000
@@ -4340,6 +4340,8 @@
pedwarn ("ISO C90 forbids variable-size array %qs",
name);
}
+ if (warn_variable_decl)
+ warning (0, "variable-sized array %qs", name);
}
if (integer_zerop (size))
--- gcc/c.opt.orig 2011-03-23 17:06:25.000000000 +0000
+++ gcc/c.opt 2011-06-27 16:00:47.000000000 +0000
@@ -404,6 +404,10 @@
C ObjC Var(warn_traditional)
Warn about features not present in traditional C
+Wtrampolines
+Common Var(warn_trampolines)
+Warn when trampolines are emitted
+
Wtrigraphs
C ObjC C++ ObjC++
Warn if trigraphs are encountered that might affect the meaning of the program
--- gcc/common.opt.orig 2011-03-23 17:06:27.000000000 +0000
+++ gcc/common.opt 2011-06-27 16:00:47.000000000 +0000
@@ -189,6 +189,10 @@
Common Var(warn_unused_variable)
Warn when a variable is unused
+Wvariable-decl
+Common Var(warn_variable_decl)
+Warn about variable-sized declarations.
+
Wvolatile-register-var
Common Var(warn_register_var)
Warn when a register variable is declared volatile
--- gcc/tree-nested.c.orig 2011-06-27 16:02:10.000000000 +0000
+++ gcc/tree-nested.c 2011-06-27 16:11:47.000000000 +0000
@@ -750,7 +750,7 @@
for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
{
for (arg = DECL_ARGUMENTS (cgn->decl); arg; arg = TREE_CHAIN (arg))
- if (variably_modified_type_p (TREE_TYPE (arg), 0), orig_fndecl)
+ if (variably_modified_type_p (TREE_TYPE (arg), orig_fndecl))
return true;
if (check_for_nested_with_variably_modified (cgn->decl, orig_fndecl))
@@ -1621,6 +1621,10 @@
it doesn't need a trampoline. */
if (DECL_NO_STATIC_CHAIN (decl))
break;
+ if (warn_trampolines)
+ {
+ warning(0, "local function address taken needing trampoline generation");
+ }
/* Lookup the immediate parent of the callee, as that's where
we need to insert the trampoline. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1309209359.55151.YahooMailClassic>
