Hello,

The attached patch for libstdc++ / VxWorks helps building
the library for old versions of the OS, as witnessed with
VxWorks 6.9 in particular.

It explicitly requests C99 features from old system headers,
on which libstc++ relies since at least c++98. The specific
issue that exposed this was a failure to compile

  libstdc++-v3/src/c++17/floating_to_chars.cc

for VxWorks 6.9 with a batch of errors such as:

  error: 'FP_NAN' was not declared in this scope

The missing definitions are provided by the
system headers with guards on _HAS_C9X, which gets
internally defined when _C99 is.

Ok to commit?

Thanks in advance!

2021-12-07  Olivier Hainque  <hain...@adacore.com>

libstdc++-v3/

        * config/os/vxworks/os_defines.h: #define _C99.

Olivier

Attachment: 0001-Define-_C99-in-libstdc-vxworks-os_defines.h.patch
Description: Binary data

Reply via email to