2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50901
* call.c (build_new_op_1): Handle ABS_EXPR together with the
other unary EXPR.
/testsuite
2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50901
* g++.dg/cpp0x/pr50901.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180670
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50901
+ * call.c (build_new_op_1): Handle ABS_EXPR together with the
+ other unary EXPR.
+
2011-10-28 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
case POSTDECREMENT_EXPR:
case REALPART_EXPR:
case IMAGPART_EXPR:
+ case ABS_EXPR:
return cp_build_unary_op (code, arg1, candidates != 0, complain);
case ARRAY_REF:
+2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50901
+ * g++.dg/cpp0x/pr50901.C: New.
+
2011-10-29 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/fma-check.h (main): Use return 0 instead of exit (0).
--- /dev/null
+// { dg-options "-std=c++0x" }
+
+template<class T> int foo(int a)
+{
+ const unsigned b = a < 0 ? -a : a;
+ return 0;
+}
+
+int i = foo<float>(1);