aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-11-12 15:50:45 -0500
committerJason Merrill <jason@gcc.gnu.org>2008-11-12 15:50:45 -0500
commit41b81065aeaf755949819944088e09aa528a9b06 (patch)
tree8fdace543da40707cb9b62a31440fa60bc60f1a8 /gcc/c-common.c
parentdea4e8d064c5fb2e5693602fcc1563886b3777e7 (diff)
downloadgcc-41b81065aeaf755949819944088e09aa528a9b06.zip
gcc-41b81065aeaf755949819944088e09aa528a9b06.tar.gz
gcc-41b81065aeaf755949819944088e09aa528a9b06.tar.bz2
re PR c++/38007 (g++ instantiate same operator twice due to bitfield in -O0 mode, causing symbol already defined assembler error)
PR c++/38007 gcc/cp/ * typeck.c (cp_build_modify_expr): Update bitfield handling. gcc/ * c-common.c (c_common_signed_or_unsigned_type): Remove C++ special casing. gcc/testsuite/ * g++.dg/conversion/bitfield10.C: New test. * g++.dg/warn/pr35635.C (func1): Accept additional warning. * g++.old-deja/g++.mike/enum1.C: Expect warn about assignment. * g++.dg/expr/bitfield9.C: Pass -Wno-overflow. From-SVN: r141800
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index ea7379e..df82817 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2719,7 +2719,7 @@ c_common_signed_or_unsigned_type (int unsignedp, tree type)
#define TYPE_OK(node) \
(TYPE_MODE (type) == TYPE_MODE (node) \
- && (c_dialect_cxx () || TYPE_PRECISION (type) == TYPE_PRECISION (node)))
+ && TYPE_PRECISION (type) == TYPE_PRECISION (node))
if (TYPE_OK (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (TYPE_OK (integer_type_node))
@@ -2749,10 +2749,7 @@ c_common_signed_or_unsigned_type (int unsignedp, tree type)
return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
#undef TYPE_OK
- if (c_dialect_cxx ())
- return type;
- else
- return build_nonstandard_integer_type (TYPE_PRECISION (type), unsignedp);
+ return build_nonstandard_integer_type (TYPE_PRECISION (type), unsignedp);
}
/* Build a bit-field integer type for the given WIDTH and UNSIGNEDP. */