FLTK logo

[fltk.coredev] Re: How to test C++98 compatibility?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: How to test C++98 compatibility? imacarthur 03:14 May 08  
 
On Saturday, 6 May 2023 at 10:44:17 UTC+1 Matt wrote:
I think I have a great solution for our limited callback functionality that is compatible with C++98, but how can I test that? It uses some extensive and unreadable macros and requires __VA_ARGS__, which was only "standardised" in C++99, but most older compiler "just had it".

Anyway, the solution is a header-only file that generates more complex callbacks on the fly, so simply not including the header would keep full compatibility.

My question is, is there any way to test if my code would compile on old compilers? Or should I just merge it, and we will wait for feedback?

How far back do we want to go?

Greg maybe still has MSVC-6 for example?

On the gcc side, I think anything since about gcc-4 should be fine with that, IIRC.
Older gcc versions might be more dubious, but they would most likely be from before the various gcc C++ ABI changes, so unlikely to still be used anyway...

As regards the gcc C++ binary changes: As I recall it (i.e. I didn't check this!) the C++ ABI changed at the transition from gcc-2.95 to gcc-3, and then again at about gcc-3.3 or thereabouts. It's been pretty stable since and generally compatible going forwards.
There were some systems locked into the older ABI though - I think the BeOS / Haiku folks were locked into the old gcc-2.95 ABI (thought I think Haiku added a compatibility layer later to use newer tools) and vxWorks-5 was tied to a "gcc-2.96" ABI, which I think was their port of the last supported 2.95 version. (VxWorks-6 shipped with gcc-4.3, and that was "long ago" now anyway.)

Other than that, I'd assume most platforms have tools "modern enough" to make it work... anything that does not is likely to be pretty niche (like emulating the ABI of the Apple Newton, say) so we'd likely never be able to test it anyway.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/fe899b69-9bcc-4188-8aa3-42eb91884f4cn%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.