public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6403] analyzer: Support errno for newlib Date: Thu, 2 Mar 2023 01:13:31 +0000 (GMT) [thread overview] Message-ID: <20230302011331.C9D483858C83@sourceware.org> (raw) https://gcc.gnu.org/g:8590e4d096e4636c9384f7f885b979026861c29f commit r13-6403-g8590e4d096e4636c9384f7f885b979026861c29f Author: Hans-Peter Nilsson <hp@axis.com> Date: Wed Mar 1 03:54:03 2023 +0100 analyzer: Support errno for newlib Without this definition, the errno definition for newlib isn't recognized as such, and these tests fail for newlib targets: FAIL: gcc.dg/analyzer/call-summaries-errno.c (test for warnings, line 16) FAIL: gcc.dg/analyzer/call-summaries-errno.c (test for excess errors) FAIL: gcc.dg/analyzer/errno-1.c (test for warnings, line 20) FAIL: gcc.dg/analyzer/errno-1.c (test for excess errors) FAIL: gcc.dg/analyzer/flex-without-call-summaries.c (test for excess errors) FAIL: gcc.dg/analyzer/isatty-1.c (test for warnings, line 31) FAIL: gcc.dg/analyzer/isatty-1.c (test for warnings, line 35) FAIL: gcc.dg/analyzer/isatty-1.c (test for warnings, line 46) FAIL: gcc.dg/analyzer/isatty-1.c (test for warnings, line 56) FAIL: gcc.dg/analyzer/isatty-1.c (test for excess errors) gcc/analyzer: * kf.cc (register_known_functions): Add __errno function for newlib. Diff: --- gcc/analyzer/kf.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/analyzer/kf.cc b/gcc/analyzer/kf.cc index 3a91b6bd6eb..ed5f70398e1 100644 --- a/gcc/analyzer/kf.cc +++ b/gcc/analyzer/kf.cc @@ -1033,9 +1033,11 @@ register_known_functions (known_function_manager &kfm) and OS X like this: extern int * __error(void); #define errno (*__error()) + and similarly __errno for newlib. Add these as synonyms for "__errno_location". */ kfm.add ("___errno", make_unique<kf_errno_location> ()); kfm.add ("__error", make_unique<kf_errno_location> ()); + kfm.add ("__errno", make_unique<kf_errno_location> ()); } /* Language-specific support functions. */
reply other threads:[~2023-03-02 1:13 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=20230302011331.C9D483858C83@sourceware.org \ --to=hp@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).