Patchwork [google/integration] Add placeholder -Wself-assign flag for compatibility with other branches

login
register
mail settings
Submitter Simon Baldwin
Date May 24, 2011, 2:59 p.m.
Message ID <20110524145909.3F1C01DA1C2@topo.tor.corp.google.com>
Download mbox | patch
Permalink /patch/97171/
State New
Headers show

Comments

Simon Baldwin - May 24, 2011, 2:59 p.m.
Add placeholder -Wself-assign flag for compatibility with other branches.

Add -Wself-assign to common.opts so that invocations of gcc with the flag
do not cause compilation to fail.  The flag is silently ignored.

OK for google/integration?

gcc/ChangeLog.google-integration:
2011-05-24  Simon Baldwin  <simonb@google.com>

	* common.opt (-Wself-assign): New placeholder flag.
Diego Novillo - May 24, 2011, 3:03 p.m.
On Tue, May 24, 2011 at 11:59, Simon Baldwin <simonb@google.com> wrote:

> gcc/ChangeLog.google-integration:
> 2011-05-24  Simon Baldwin  <simonb@google.com>
>
>        * common.opt (-Wself-assign): New placeholder flag.

OK.


Diego.

Patch

Index: gcc/common.opt
===================================================================
--- gcc/common.opt	(revision 174116)
+++ gcc/common.opt	(working copy)
@@ -561,6 +561,13 @@  Wpadded
 Common Var(warn_padded) Warning
 Warn when padding is required to align structure members
 
+; FIXME.  The following -Wself-assign flag is a placeholder to prevent
+; confusing the compiler when applications are built with these flags.
+; Actual support for this flag is found in the google/main branch.
+Wself-assign
+Common Var(warn_self_assign) Init(0) Warning
+Warn when a variable is assigned to itself
+
 Wshadow
 Common Var(warn_shadow) Warning
 Warn when one local variable shadows another