public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-10361] Testsuite: fix analyzer tests on Darwin Date: Sat, 20 Apr 2024 14:46:31 +0000 (GMT) [thread overview] Message-ID: <20240420144631.6C9463858D37@sourceware.org> (raw) https://gcc.gnu.org/g:c2cb625eb141cacd0bee6c6ce5888d673ac38ca4 commit r12-10361-gc2cb625eb141cacd0bee6c6ce5888d673ac38ca4 Author: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Date: Sat Aug 19 23:22:06 2023 +0200 Testsuite: fix analyzer tests on Darwin On macOS, system headers redefine by default some macros (memcpy, memmove, etc) to checked versions, which defeats the analyzer. We want to turn this off. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104042 gcc/testsuite/ChangeLog: PR analyzer/104042 * gcc.dg/analyzer/analyzer.exp: Pass -D_FORTIFY_SOURCE=0 on Darwin. (cherry picked from commit ce33bbfcbc7dd3afc6c96fb48a19ed00f0c598ce) Diff: --- gcc/testsuite/gcc.dg/analyzer/analyzer.exp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer.exp b/gcc/testsuite/gcc.dg/analyzer/analyzer.exp index 15d979cd8b5..333e8402443 100644 --- a/gcc/testsuite/gcc.dg/analyzer/analyzer.exp +++ b/gcc/testsuite/gcc.dg/analyzer/analyzer.exp @@ -32,6 +32,14 @@ if [info exists DEFAULT_CFLAGS] then { # If a testcase doesn't have special options, use these. set DEFAULT_CFLAGS "-fanalyzer -Wanalyzer-too-complex -fanalyzer-call-summaries" +if { [istarget "*-*-darwin*" ] } { + # On macOS, system headers redefine by default some macros (memcpy, + # memmove, etc) to checked versions, which defeats the analyzer. We + # want to turn this off. + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104042 + set DEFAULT_CFLAGS "$DEFAULT_CFLAGS -D_FORTIFY_SOURCE=0" +} + # Initialize `dg'. dg-init
reply other threads:[~2024-04-20 14:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240420144631.6C9463858D37@sourceware.org \ --to=iains@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).