diff options
author | pfg <pfg@FreeBSD.org> | 2013-12-12 18:15:32 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-12-12 18:15:32 +0000 |
commit | 4bda5ad442033e7431a147e520f5977706e24fa2 (patch) | |
tree | 7b6b120517c1009026b40fb07c5e9346ae61871f /contrib/gcc/cp/semantics.c | |
parent | 465403a5cc91e82c71efd87f017455ae0609eb30 (diff) | |
download | FreeBSD-src-4bda5ad442033e7431a147e520f5977706e24fa2.zip FreeBSD-src-4bda5ad442033e7431a147e520f5977706e24fa2.tar.gz |
MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
r258206, r258207, r258321
This is a series of commits inspired on Google's gcc-4.2.1 for
Android that were taken from the gcc pre-4.3 under the GPLv2.
gcc: Backport fixes for -W parentheses in C++
This fixes GCC 19564.
gcc: merge rs6000 change from FSF pre-gcc43
Don't set MASK_PPC_GFXOPT for 8540 or 8548.
Merge vrp-tree fix from gcc-4.3
Fix missed conversion from / to >> (GCC PR32521)
Merge in GCCr120505 to include definition of TREE_OVERFLOW_P
gcc: warn about integer overflow in constant expressions in the C++ frontend.
gcc: Add a new option -Wvla to warn variable length array.
libcpp: preprocessor speedup patches from upstream gcc.
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
gcc: Fix postreload-gcse treatment of call-clobbered registers.
gcc: Record some previous commits in the ChangeLog.gcc43 file.
Diffstat (limited to 'contrib/gcc/cp/semantics.c')
-rw-r--r-- | contrib/gcc/cp/semantics.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/gcc/cp/semantics.c b/contrib/gcc/cp/semantics.c index 9c37b36..ee16e75 100644 --- a/contrib/gcc/cp/semantics.c +++ b/contrib/gcc/cp/semantics.c @@ -587,6 +587,16 @@ maybe_convert_cond (tree cond) /* Do the conversion. */ cond = convert_from_reference (cond); + + if (TREE_CODE (cond) == MODIFY_EXPR + && !TREE_NO_WARNING (cond) + && warn_parentheses) + { + warning (OPT_Wparentheses, + "suggest parentheses around assignment used as truth value"); + TREE_NO_WARNING (cond) = 1; + } + return condition_conversion (cond); } |