summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-27 16:06:08 +0000
committerpfg <pfg@FreeBSD.org>2013-12-27 16:06:08 +0000
commit020ad1f282db55011d51031eb05015f0e3fb1161 (patch)
tree97d253bb94f5309a98dbf5dac4b79832c559f8ad /contrib/gcc/cp
parent285471a802bf8879f872192d04afdc581490d121 (diff)
downloadFreeBSD-src-020ad1f282db55011d51031eb05015f0e3fb1161.zip
FreeBSD-src-020ad1f282db55011d51031eb05015f0e3fb1161.tar.gz
gcc: Merge upstream changes.
Include types in error message for build_binary_op. Mostly cosmetic changes, to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2)
Diffstat (limited to 'contrib/gcc/cp')
-rw-r--r--contrib/gcc/cp/ChangeLog.gcc438
-rw-r--r--contrib/gcc/cp/Make-lang.in2
-rw-r--r--contrib/gcc/cp/mangle.c2
-rw-r--r--contrib/gcc/cp/rtti.c8
-rw-r--r--contrib/gcc/cp/typeck.c2
5 files changed, 17 insertions, 5 deletions
diff --git a/contrib/gcc/cp/ChangeLog.gcc43 b/contrib/gcc/cp/ChangeLog.gcc43
index 701bea8..f542192 100644
--- a/contrib/gcc/cp/ChangeLog.gcc43
+++ b/contrib/gcc/cp/ChangeLog.gcc43
@@ -18,6 +18,14 @@
* decl2.c (determine_visibility): Remove duplicate code for
handling type info.
+2007-05-31 Daniel Berlin <dberlin@dberlin.org> (r125239)
+
+ * typeck.c (build_binary_op): Include types in error.
+
+2007-05-18 Geoffrey Keating <geoffk@apple.com> (r124839)
+
+ * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
+
2007-05-05 Geoffrey Keating <geoffk@apple.com> (r124467)
PR 31775
diff --git a/contrib/gcc/cp/Make-lang.in b/contrib/gcc/cp/Make-lang.in
index ea03357..c863913 100644
--- a/contrib/gcc/cp/Make-lang.in
+++ b/contrib/gcc/cp/Make-lang.in
@@ -265,7 +265,7 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h $(RTL_H) \
$(TARGET_H) debug.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H)
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h convert.h \
- gt-cp-rtti.h
+ $(TARGET_H) gt-cp-rtti.h
cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) except.h \
toplev.h cp/cfns.h $(EXPR_H) libfuncs.h $(TREE_INLINE_H) $(TARGET_H)
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) $(FLAGS_H) $(EXPR_H) \
diff --git a/contrib/gcc/cp/mangle.c b/contrib/gcc/cp/mangle.c
index c327133..8bfdc20 100644
--- a/contrib/gcc/cp/mangle.c
+++ b/contrib/gcc/cp/mangle.c
@@ -1340,7 +1340,7 @@ write_real_cst (const tree value)
for (; i != limit; i += dir)
{
- sprintf (buffer, "%08lx", target_real[i]);
+ sprintf (buffer, "%08lx", (unsigned long) target_real[i]);
write_chars (buffer, 8);
}
}
diff --git a/contrib/gcc/cp/rtti.c b/contrib/gcc/cp/rtti.c
index 077d3e0..5e58e5c 100644
--- a/contrib/gcc/cp/rtti.c
+++ b/contrib/gcc/cp/rtti.c
@@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */
#include "assert.h"
#include "toplev.h"
#include "convert.h"
+#include "target.h"
/* C++ returns type information to the user in struct type_info
objects. We also use type information to implement dynamic_cast and
@@ -1427,8 +1428,11 @@ emit_support_tinfos (void)
comdat_linkage for details.) Since we want these objects
to have external linkage so that copies do not have to be
emitted in code outside the runtime library, we make them
- non-COMDAT here. */
- if (!flag_weak)
+ non-COMDAT here.
+
+ It might also not be necessary to follow this detail of the
+ ABI. */
+ if (!flag_weak || ! targetm.cxx.library_rtti_comdat ())
{
gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
DECL_INTERFACE_KNOWN (tinfo) = 1;
diff --git a/contrib/gcc/cp/typeck.c b/contrib/gcc/cp/typeck.c
index 5325989..1db89b49 100644
--- a/contrib/gcc/cp/typeck.c
+++ b/contrib/gcc/cp/typeck.c
@@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
|| !same_scalar_type_ignoring_signedness (TREE_TYPE (type0),
TREE_TYPE (type1)))
{
- binary_op_error (code);
+ binary_op_error (code, type0, type1);
return error_mark_node;
}
arithmetic_types_p = 1;
OpenPOWER on IntegriCloud