forked from lijiext/lammps
still need to disable variable tracking to silence unwanted warnings on ubuntu
This commit is contained in:
parent
cec18b6aef
commit
60dfb6f77f
|
@ -250,17 +250,23 @@ The typecast prevents compiler warnings about possible truncations.
|
||||||
// functions and avoid compiler warnings about variable tracking.
|
// functions and avoid compiler warnings about variable tracking.
|
||||||
// Disable for broken -D_FORTIFY_SOURCE feature.
|
// Disable for broken -D_FORTIFY_SOURCE feature.
|
||||||
|
|
||||||
#if defined(_FORTIFY_SOURCE) && (_FORTIFY_SOURCE > 0)
|
#if defined(__clang__)
|
||||||
#define _noopt
|
|
||||||
#elif defined(__clang__)
|
|
||||||
# define _noopt __attribute__((optnone))
|
# define _noopt __attribute__((optnone))
|
||||||
#elif defined(__INTEL_COMPILER)
|
#elif defined(__INTEL_COMPILER)
|
||||||
# define _noopt
|
# define _noopt
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))
|
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))
|
||||||
# define _noopt __attribute__((optimize("O0","no-var-tracking-assignments")))
|
# 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
|
# else
|
||||||
# define _noopt __attribute__((optimize("O0")))
|
# if defined(_FORTIFY_SOURCE) && (_FORTIFY_SOURCE > 0)
|
||||||
|
# define _noopt
|
||||||
|
# else
|
||||||
|
# define _noopt __attribute__((optimize("O0")))
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define _noopt
|
# define _noopt
|
||||||
|
|
Loading…
Reference in New Issue