Changes between Initial Version and Version 1 of Ticket #57578


Ignore:
Timestamp:
Nov 11, 2018, 10:24:56 PM (6 years ago)
Author:
noloader (Jeffrey Walton)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57578 – Description

    initial v1  
    11I'm testing C++17 on OS X 10.8.5 and 10.9.5 using Macports Clang compiler versions 5.0 and 6.0. Attempting to compile the following program:
    22
    3   $ cat test.cxx
    4   #if __EXCEPTIONS && __has_feature(cxx_exceptions)
    5   # include <exception>
    6   # define CXX17_EXCEPTIONS 1
    7   #endif
     3{{{
     4$ cat test.cxx
     5#if __EXCEPTIONS && __has_feature(cxx_exceptions)
     6# include <exception>
     7# define CXX17_EXCEPTIONS 1
     8#endif
    89
    9   void Foo()
    10   {
    11   #if defined(CXX17_EXCEPTIONS)
    12       if (std::uncaught_exceptions() == 0)
    13   #endif
    14       {
    15           int x = 0;
    16       }
    17   }
     10void Foo()
     11{
     12#if defined(CXX17_EXCEPTIONS)
     13    if (std::uncaught_exceptions() == 0)
     14#endif
     15    {
     16        int x = 0;
     17    }
     18}
     19}}}
    1820
    1921Results in:
    2022
     23{{{
    2124$ /opt/local/bin/clang++-mp-5.0 -std=gnu++17 test.cxx -c
    2225test.cxx:9:14: error: 'uncaught_exceptions' is unavailable: introduced in macOS 10.12
     
    2629      'uncaught_exceptions' has been explicitly marked unavailable here
    2730_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_e...
    28                                                               ^
     31}}}
     32                                                           ^
    2933-std=c++17 produces the same error.
    3034