Skip to content

Commit 21d9ff6

Browse files
committed
csgcca: pass -fexceptions to 'gcc --fanalyzer'
... to eliminate spurious GCC_WARNING reports on glibc-2.33.9000-52.el9: Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/dirent/scandir64-tail.c:24: included_from: Included from here. glibc-2.33.9000-984-gddcc612ce9/dirent/scandir-tail-common.c: scope_hint: In function '__scandir64_tail' glibc-2.33.9000-984-gddcc612ce9/dirent/scandir-tail-common.c:36:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_push'; did you mean '__libc_cleanup_push_defer'? Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/dirent/scandir-tail-common.c:98:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_pop' Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/elf/dl-iteratephdr.c: scope_hint: In function '__dl_iterate_phdr' glibc-2.33.9000-984-gddcc612ce9/elf/dl-iteratephdr.c:41:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_push'; did you mean '__libc_cleanup_push_defer'? Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/elf/dl-iteratephdr.c:81:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_pop' Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/elf/dl-iteratephdr.c:81:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_pop'; did you mean '__libc_cleanup_pop_restore'? Error: COMPILER_WARNING (CWE-573): glibc-2.33.9000-984-gddcc612ce9/libio/fileops.c:506:3: warning[-Wimplicit-int]: type defaults to 'int' in declaration of '_IO_switch_to_get_mode' Error: COMPILER_WARNING (CWE-573): glibc-2.33.9000-984-gddcc612ce9/libio/fileops.c:517:3: warning[-Wimplicit-int]: type defaults to 'int' in declaration of 'count' Error: COMPILER_WARNING (CWE-573): glibc-2.33.9000-984-gddcc612ce9/libio/iofclose.c:74:3: warning[-Wimplicit-int]: type defaults to 'int' in declaration of '_IO_deallocate_file' Error: COMPILER_WARNING (CWE-573): glibc-2.33.9000-984-gddcc612ce9/libio/wfileops.c:220:3: warning[-Wimplicit-int]: type defaults to 'int' in declaration of '_IO_switch_to_get_mode' Error: COMPILER_WARNING (CWE-573): glibc-2.33.9000-984-gddcc612ce9/libio/wfileops.c:269:3: warning[-Wimplicit-int]: type defaults to 'int' in declaration of 'status' Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/misc/getpass.c: scope_hint: In function 'getpass' glibc-2.33.9000-984-gddcc612ce9/misc/getpass.c:74:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_push'; did you mean '__libc_cleanup_push_defer'? Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/misc/getpass.c:117:3: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_pop' Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/misc/syslog.c: scope_hint: In function '__vsyslog_internal' glibc-2.33.9000-984-gddcc612ce9/misc/syslog.c:165:9: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_push'; did you mean '__libc_cleanup_push_defer'? Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/misc/syslog.c:298:9: warning[-Wimplicit-function-declaration]: implicit declaration of function '__libc_cleanup_pop'; did you mean '__libc_cleanup_pop_restore'? Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/nptl/pthread_once.c: scope_hint: In function '__pthread_once_slow' glibc-2.33.9000-984-gddcc612ce9/nptl/pthread_once.c:115:7: warning[-Wimplicit-function-declaration]: implicit declaration of function 'pthread_cleanup_combined_push'; did you mean 'pthread_cleanup_push'? Error: COMPILER_WARNING (CWE-686): glibc-2.33.9000-984-gddcc612ce9/nptl/pthread_once.c:119:7: warning[-Wimplicit-function-declaration]: implicit declaration of function 'pthread_cleanup_combined_pop'; did you mean 'pthread_cleanup_pop'?
1 parent 04736ac commit 21d9ff6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/cswrap-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ int translate_args_for_analyzer(int argc, char **argv)
299299

300300
if (analyzer_is_gcc_compatible) {
301301
if (STREQ(arg, "-m16") || STREQ(arg, "-m32") || STREQ(arg, "-m64")
302+
|| STREQ(arg, "-fexceptions")
302303
|| STREQ(arg, "-fno-exceptions")
303304
|| MATCH_PREFIX(arg, "-O")
304305
|| MATCH_PREFIX(arg, "-std"))

0 commit comments

Comments
 (0)