Experimental Physics and Industrial Control System
Hi Bob,
Does it compile with gcc 6.1's default c++14 mode if constexpr is substituted for const on that line? Or is the problem related to stricter array length checking at compile time with c++14 which is causing this particular c++ compiler exception support sanity check to fail.
Jeff
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Bob Soliday
> Sent: Tuesday, June 28, 2016 8:12 AM
> To: [email protected]
> Subject: Re: Compiling EPICS 3.14.12.5 with GCC 6
>
> You can get it to compile with gcc 6.1 if you edit
> epicsExceptionTest.cpp and remove the "const" from the line:
>
> static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
>
> There is a change committed to the for the next release, but it checks
> the version of gcc. It probably should check which -std option was given
> instead.
>
> --Bob Soliday
>
> On 06/28/2016 04:00 AM, Luca Cavalli wrote:
> > Dear all,
> >
> > on my office laptop I'm running Fedora 24, which comes with GCC 6 by
> > default.
> >
> > It seems that compiling EPICS 3.14.12.5 with GCC 6 fails here:
> >
> > /usr/bin/g++ -c -D_GNU_SOURCE -D_DEFAULT_SOURCE -
> > D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -m64 -MMD -I.
> > -I../O.Common -I. -I.. -I../../../../include/os/Linux
> > -I../../../../include ../epicsExceptionTest.cpp
> > ../epicsExceptionTest.cpp: In function ‘void
> > epicsExceptionTestPrivate()’:
> > ../epicsExceptionTest.cpp:68:49: error: size of array is too large
> > char * p = new char [unsuccessfulNewSize];
> > ^
> > ../epicsExceptionTest.cpp:79:38: error: size of array is too large
> > char [unsuccessfulNewSize];
> > ^
> > ../../../../configure/RULES_BUILD:218: recipe for target
> > 'epicsExceptionTest.o' failed
> >
> > GCC 6 defaults to -std=gnu++14 instead of -std=gnu++98 [1]. Adding this
> > option to compiler command seems to fix the problem, but which is the
> > best place to set the desired standard?
> >
> > I tried in config/CONFIG_COMMON modifying:
> >
> > POSIX_CPPFLAGS += $(POSIX_CPPFLAGS_$(POSIX)) -std=gnu++98
> >
> > or:
> >
> > USR_CXXFLAGS = -std=gnu++98
> >
> > but the option seems to be ignored.
> >
> >
> > Thanks for your help.
> >
> > Cheers,
> >
> > Luca
> >
> >
> > [1] - https://gcc.gnu.org/gcc-6/porting_to.html#gxx14
> >
> >
> > ________________________________
> >
> > << Le informazioni contenute in questo messaggio di posta elettronica e
> relativi allegati sono riservate e confidenziali e ne è vietata la diffusione in
> qualunque modo eseguita. Qualora Lei non fosse la persona a cui il presente
> messaggio è destinato, La invitiamo ad eliminarlo e a darcene gentile
> comunicazione. Quanto precede ai fini del rispetto delle Legge 675/96 e del
> Decreto Legislativo 30/06/2003 n.196, sulla tutela dei dati personali >>
> >
> > << This e-mail is confidential and may well also be legally privileged. If you
> have received it in error, you are on notice of its status. Please notify us
> immediately by reply e-mail and then delete this message from your system.
> Please do not copy it or use it for any purposes, or disclose its contents to any
> other person: to do so could be a breach of confidence. Thank you for your co-
> operation. Please contact our IT Helpdesk on +3902380481 or email
> [email protected] if you need assistance >>
> >
> >
- References:
- Compiling EPICS 3.14.12.5 with GCC 6 Luca Cavalli
- Re: Compiling EPICS 3.14.12.5 with GCC 6 Bob Soliday
- Navigate by Date:
- Prev:
RE: Call to assert failed - EPICS Pedro Mantovani Antunes
- Next:
Re: Including libraries in subroutines Stephen Molloy
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Compiling EPICS 3.14.12.5 with GCC 6 Bob Soliday
- Next:
bit shifting operators [email protected]
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024