This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH to change default dialect to C++14


On 07/01/2015 11:17 PM, Jim Wilson wrote:
> On Wed, Jul 1, 2015 at 10:21 PM, Jason Merrill <jason@redhat.com> wrote:
>> This document also says that "A workaround until libraries get updated is to
>> include <cstddef> or <stddef.h> before any headers from that library."
>> Can you try modifying the graphite* files accordingly?
> 
> Right.  I forgot to try that.  Trying it now, I see that my build gets
> past the point that it failed, so this does appear to work.  I won't
> be able to finish a proper test until tomorrow, but for now this patch
> seems to work.

Since the patch to include system.h before the isl header did not work,
I went ahead and tested this patch to add stddef.h includes before the
isl headers.  I tested it with an x86_64 bootstrap and make check.
There were no problems caused by my patch.

Though as a side effect of doing this, I discovered another minor
problem with the C++ version change.  This caused one additional
testsuite failure.  It also caused a bunch of tests to start working,
which is nice, but the new failure needs to be addressed.

/home/wilson/FOSS/GCC/gcc-svn/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.
c: In function 'void test_double_int_round_udiv()':
/home/wilson/FOSS/GCC/gcc-svn/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.
c:13:45: error: narrowing conversion of '-1' from '
int' to 'long unsigned int' inside { } [-Wnarrowing]
   double_int dmax = { -1, HOST_WIDE_INT_MAX };
                                             ^
/home/wilson/FOSS/GCC/gcc-svn/gcc/testsuite/gcc.dg/plugin/wide-int_plugin.
c:14:33: error: narrowing conversion of '-1' from '
int' to 'long unsigned int' inside { } [-Wnarrowing]
   double_int dnegone = { -1, -1 };
                                 ^
...
FAIL: gcc.dg/plugin/wide-int_plugin.c compilation

The code compiles with -std=c++98.  It does not compile with -std=c++14.
 So this testcase should be fixed to work with c++14.  Or the c++14
support should be fixed if it is broken.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]