diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2018-09-03 19:46:46 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2018-09-03 19:46:46 +0300 |
commit | 71acd8b9d9d8c9437bfffa51f1b56f93cfbc20e9 (patch) | |
tree | aeb1615ea6e77b0603ffbf15f04db99c43128a8f /gcc/system.h | |
parent | 158985b1a59e33d6536cb570bb5fbc9b79c96034 (diff) | |
download | gcc-71acd8b9d9d8c9437bfffa51f1b56f93cfbc20e9.zip gcc-71acd8b9d9d8c9437bfffa51f1b56f93cfbc20e9.tar.gz gcc-71acd8b9d9d8c9437bfffa51f1b56f93cfbc20e9.tar.bz2 |
qsort_chk: call from gcc_qsort instead of wrapping it
* sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
* system.h (qsort): Always redirect to gcc_qsort. Update comment.
* vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
From-SVN: r264065
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/system.h b/gcc/system.h index f87fbaa..203c6a4 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1197,17 +1197,13 @@ helper_const_non_const_cast (const char *p) /* Get definitions of HOST_WIDE_INT. */ #include "hwint.h" -/* qsort comparator consistency checking: except in release-checking compilers, - redirect 4-argument qsort calls to qsort_chk; keep 1-argument invocations +/* GCC qsort API-compatible functions: except in release-checking compilers, + redirect 4-argument qsort calls to gcc_qsort; keep 1-argument invocations corresponding to vec::qsort (cmp): they use C qsort internally anyway. */ void qsort_chk (void *, size_t, size_t, int (*)(const void *, const void *)); void gcc_qsort (void *, size_t, size_t, int (*)(const void *, const void *)); #define PP_5th(a1, a2, a3, a4, a5, ...) a5 #undef qsort -#if CHECKING_P -#define qsort(...) PP_5th (__VA_ARGS__, qsort_chk, 3, 2, qsort, 0) (__VA_ARGS__) -#else #define qsort(...) PP_5th (__VA_ARGS__, gcc_qsort, 3, 2, qsort, 0) (__VA_ARGS__) -#endif #endif /* ! GCC_SYSTEM_H */ |