svn commit: r224600 - stable/8/contrib/gcc
Ulrich Spoerlein
uqs at FreeBSD.org
Tue Aug 2 09:06:05 UTC 2011
Author: uqs
Date: Tue Aug 2 09:06:04 2011
New Revision: 224600
URL: http://svn.freebsd.org/changeset/base/224600
Log:
MFH r223715
- Fix typo in check_for_nested_with_variably_modified
- Implement -Wvariable-decl.
- Port -Wtrampolines support from gcc3.
(all three also via OpenBSD)
PR: gnu/127136, gnu/157019
Submitted by: Henning Petersen, Pedro Giffuni
Modified:
stable/8/contrib/gcc/c-decl.c
stable/8/contrib/gcc/c.opt
stable/8/contrib/gcc/common.opt
stable/8/contrib/gcc/tree-nested.c
Directory Properties:
stable/8/contrib/gcc/ (props changed)
Modified: stable/8/contrib/gcc/c-decl.c
==============================================================================
--- stable/8/contrib/gcc/c-decl.c Tue Aug 2 08:31:23 2011 (r224599)
+++ stable/8/contrib/gcc/c-decl.c Tue Aug 2 09:06:04 2011 (r224600)
@@ -4340,6 +4340,8 @@ grokdeclarator (const struct c_declarato
pedwarn ("ISO C90 forbids variable-size array %qs",
name);
}
+ if (warn_variable_decl)
+ warning (0, "variable-sized array %qs", name);
}
if (integer_zerop (size))
Modified: stable/8/contrib/gcc/c.opt
==============================================================================
--- stable/8/contrib/gcc/c.opt Tue Aug 2 08:31:23 2011 (r224599)
+++ stable/8/contrib/gcc/c.opt Tue Aug 2 09:06:04 2011 (r224600)
@@ -404,6 +404,10 @@ Wtraditional
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
Modified: stable/8/contrib/gcc/common.opt
==============================================================================
--- stable/8/contrib/gcc/common.opt Tue Aug 2 08:31:23 2011 (r224599)
+++ stable/8/contrib/gcc/common.opt Tue Aug 2 09:06:04 2011 (r224600)
@@ -189,6 +189,10 @@ Wunused-variable
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
Modified: stable/8/contrib/gcc/tree-nested.c
==============================================================================
--- stable/8/contrib/gcc/tree-nested.c Tue Aug 2 08:31:23 2011 (r224599)
+++ stable/8/contrib/gcc/tree-nested.c Tue Aug 2 09:06:04 2011 (r224600)
@@ -750,7 +750,7 @@ check_for_nested_with_variably_modified
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 @@ convert_tramp_reference (tree *tp, int *
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. */
More information about the svn-src-all
mailing list