Re: DEBUG_GCSAFETY broken with g++ < 4.7
Sam Steingold <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Bruno, > * Bruno Haible <[email protected]> [2016-11-10 01:54:20 +0100]: > > I need to correct your change of > > 2016-08-28 Sam Steingold <[email protected]> > > avoid the clang -Wgnu-designator warning > * lispbibl.d (as_object, as_chart): use the new {.one_o=???} > syntax instead of GNU old-style field designator extension {one_o:???} > https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Designated-Inits.html > > The reason is that it introduces compilation errors when one attempts to use > DEBUG_GCSAFETY with g++ < 4.7. The current GCC version is 6. Are you sure we need to support any version of GCC older than, say, 5? (Okay, I am using an AWS server with gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)). > With G++ 4.6.4 and older: > $ g++ -c foo.cc > foo.cc: In Funktion »gcv_object_t bar()«: > foo.cc:21:30: Fehler: expected primary-expression before »)« token > foo.cc:21:30: Fehler: expected »)« before »{« token > foo.cc:21:30: Fehler: expected »;« before »)« token > foo.cc:21:30: Fehler: expected primary-expression before »)« token > foo.cc:21:30: Fehler: expected »;« before »)« token > > The syntax .one_o=(o) > appears to be more standard: it is described in Wikipedia [1] and the GCC > documentation [2]. I wonder if the C++ standard has anything to say about it. > The syntax one_o:(o) > is only documented in the GCC doc [2] and is marked as "obsolete since GCC 2.5". > But with G++ 4.6.4 and older it's the only available syntax. Am I the only one who finds this ironic? ("obsolete since 2.5, but the only option for 4.6.4 and older") > [1] https://en.wikipedia.org/wiki/C_syntax#Designated_initializers > [2] https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Designated-Inits.html So what are you going to do? (obviously, I have no objections to whatever change you want to push) -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://iris.org.il http://camera.org http://thereligionofpeace.com In C you can make mistakes, while in C++ you can also inherit them! ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel