Opened 7 years ago
Closed 5 years ago
#6792 closed defect (wontfix)
Deprecated atomic ops starting with MacOSX 10.12
Reported by: | Kurt Schwehr | Owned by: | Kurt Schwehr |
---|---|---|---|
Priority: | low | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | minor | Keywords: | atomic c++11 macosx |
Cc: |
Description
These are C++11 functions:
- http://www.cplusplus.com/reference/atomic/atomic_fetch_add_explicit/
- http://www.cplusplus.com/reference/atomic/atomic_compare_exchange_strong_explicit/
I haven't tried these. I will do some testing before I put in a #ifdef HAVE_CXX11
. Changing from BSD to C++11 std:: functions seems like a long term good thing.
libtool: compile: g++ -std=gnu++11 -I/Users/schwehr/src/gdal/gdal/port -I/Users/schwehr/src/gdal/gdal/gcore -I/Users/schwehr/src/gdal/gdal/alg -I/Users/schwehr/src/gdal/gdal/ogr -I/Users/schwehr/src/gdal/gdal/ogr/ogrsf_frmts -I/Users/schwehr/src/gdal/gdal/gnm -I/Users/schwehr/src/gdal/gdal/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -g -DDEBUG -ftrapv -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wfloat-conversion -Wdocumentation -Wno-documentation-deprecated-sync -Wunused-private-field -Wmissing-prototypes -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wimplicit-fallthrough -DGNM_ENABLED -I/sw/include -Wextra -I/Users/schwehr/src/gdal/gdal/port -I/sw/include -I/sw/include -I/sw -I/sw/include -I/sw/include -DGDAL_COMPILATION -I/sw/include -DINST_DATA=\"/Users/schwehr/src/gdal/inst/share/gdal\" -DHAVE_CURL -DHAVE_LIBZ -I/sw/include/libxml2 -I/sw/include -DHAVE_LIBXML2 -DUSE_ONLY_CRYPTODLL_ALG -c cpl_atomic_ops.cpp -fno-common -DPIC -o .libs/cpl_atomic_ops.o cpl_atomic_ops.cpp:44:12: warning: 'OSAtomicAdd32' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_fetch_add_explicit(std::memory_order_relaxed) from <atomic> instead [-Wdeprecated-declarations] return OSAtomicAdd32(increment, (int*)(ptr)); ^ /usr/include/libkern/OSAtomicDeprecated.h:146:9: note: 'OSAtomicAdd32' has been explicitly marked deprecated here int32_t OSAtomicAdd32( int32_t __theAmount, volatile int32_t *__theValue ); ^ cpl_atomic_ops.cpp:49:12: warning: 'OSAtomicCompareAndSwap32' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_compare_exchange_strong_explicit(std::memory_order_relaxed) from <atomic> instead [-Wdeprecated-declarations] return OSAtomicCompareAndSwap32(oldval, newval, (int*)(ptr)); ^ /usr/include/libkern/OSAtomicDeprecated.h:502:9: note: 'OSAtomicCompareAndSwap32' has been explicitly marked deprecated here bool OSAtomicCompareAndSwap32( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue ); ^ 2 warnings generated.
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Note:
See TracTickets
for help on using tickets.
In 41471: