From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: Paul Eggert <eggert@cs.ucla.edu>, libc-alpha@sourceware.org
Cc: jakub@redhat.com, fweimer@redhat.com
Subject: Re: [PATCH v5 1/2] string: _FORTIFY_SOURCE=3 using __builtin_dynamic_object_size
Date: Sat, 19 Dec 2020 11:52:33 +0530 [thread overview]
Message-ID: <8bb6e08e-20c5-1d97-ec2c-1851c997602f@sourceware.org> (raw)
In-Reply-To: <f9bd77e1-cb6f-8521-78ea-2aea872bf704@cs.ucla.edu>
On 12/19/20 3:42 AM, Paul Eggert wrote:
> Also, the warning shouldn't imply that one should use LLVM 9.0 or later.
> It's not our job to recommend LLVM versions, plus that warning's wording
> would likely become dated anyway.
/me nods
> Also, there should be spaces before the parens.
>
> How about something like the following instead? It uses simpler and
> more future-proof warnings, and I find it easier to follow:
>
> +# elif _FORTIFY_SOURCE > 2 && __glibc_clang_prereq (9, 0)
> +# if _FORTIFY_SOURCE > 3
> +# warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform
> +# endif
> +# define __USE_FORTIFY_LEVEL 3
> # elif _FORTIFY_SOURCE > 1
> +# if _FORTIFY_SOURCE > 2
> +# warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform
> +# endif
> # define __USE_FORTIFY_LEVEL 2
Thanks, I like this, I'll post a v6 with the update.
Siddhesh
next prev parent reply other threads:[~2020-12-19 6:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 15:24 [PATCH v5 0/2] _FORTIFY_SOURCE=3 Siddhesh Poyarekar
2020-12-16 15:24 ` [PATCH v5 1/2] string: _FORTIFY_SOURCE=3 using __builtin_dynamic_object_size Siddhesh Poyarekar
2020-12-18 22:12 ` Paul Eggert
2020-12-19 6:22 ` Siddhesh Poyarekar [this message]
2020-12-16 15:24 ` [PATCH v5 2/2] nonstring: " Siddhesh Poyarekar
2020-12-18 4:01 ` [PATCH v5 0/2] _FORTIFY_SOURCE=3 Siddhesh Poyarekar
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=8bb6e08e-20c5-1d97-ec2c-1851c997602f@sourceware.org \
--to=siddhesh@sourceware.org \
--cc=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
--cc=jakub@redhat.com \
--cc=libc-alpha@sourceware.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: link
Be 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).