Unverified Commit 60dfb6f7 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

still need to disable variable tracking to silence unwanted warnings on ubuntu

parent cec18b6a
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -250,18 +250,24 @@ The typecast prevents compiler warnings about possible truncations.
// functions and avoid compiler warnings about variable tracking.
// Disable for broken -D_FORTIFY_SOURCE feature.

#if defined(_FORTIFY_SOURCE) && (_FORTIFY_SOURCE > 0)
#define _noopt
#elif defined(__clang__)
#if defined(__clang__)
#  define _noopt __attribute__((optnone))
#elif defined(__INTEL_COMPILER)
#  define _noopt
#elif defined(__GNUC__)
#  if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))
#    if defined(_FORTIFY_SOURCE) && (_FORTIFY_SOURCE > 0)
#      define _noopt __attribute__((optimize("no-var-tracking-assignments")))
#    else
#      define _noopt __attribute__((optimize("O0","no-var-tracking-assignments")))
#    endif
#  else
#    if defined(_FORTIFY_SOURCE) && (_FORTIFY_SOURCE > 0)
#      define _noopt
#    else
#      define _noopt __attribute__((optimize("O0")))
#    endif
#  endif
#else
#  define _noopt
#endif