[cfe-dev] Relaxing format specifier checks

Hubert Tong via cfe-dev cfe-dev at lists.llvm.org
Thu May 17 10:52:24 PDT 2018


On Thu, May 17, 2018 at 12:12 PM, JF Bastien <jfbastien at apple.com> wrote:

> Something Darwin-specific was considered to begin with in D42933; however,
> the discussion has evolved, and the version being proposed in this thread
> applies past the default that "recently changed". I am responding to this
> proposal, not D42933 (which, at this point, is more a discussion than a
> proposal).
>
>
>
> Sure. The reason I bring back D42933 is, as I’ve stated to Hans above,
> that if this proposal doesn’t address D42933 then we still need to
> address D42933. Further, D42933 is relevant because it’s a fairly similar
> datapoint to Facebook’s, albeit much more narrow.
>
I agree, if the outcome of this proposal doesn’t address D42933, then the
latter needs to be addressed separately.


>
>
> Specifically, is it about platform guarantees,
>>
> I understand that platforms may provide guarantees, and that software may
> be written with those platforms in mind. Clang might not be limited to
> platforms with certain specific guarantees, and so, I think that adjusting
> for platform guarantees should be opt-in (by the target or otherwise).
>
>
> Opt-in by the platform was the original D42933 proposal. It sounds like
> you’re OK with that approach if Shoaib’s proposal goes in another direction?
>
Yes; I am okay with that general direction.


>
>
> Furthermore, the extent of the specific guarantee being mentioned might be
> of interest. Is this a platform guarantee beyond having the same object
> representation, same value representation for all values, and the same
> alignment? A possible reading of the proposal with regards to conversion
> specifications for pointers to integral types would say that the proposal
> is talking about the type pointed to. Guarantees on the validity of using
> glvalues of one type to access objects of the other would then be of
> interest.
>
> I agree that it is possible to read the proposal as not applying to
> pointer arguments. I am hoping we are good with clarifying on taking the
> latter interpretation.
>
>
> This is one of the reasons I dislike -Wformat-relaxed as a name. Relaxed
> what?
>
Pinning down the name seems to be a step to take after determining what we
need an option for.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180517/b6902de6/attachment.html>


More information about the cfe-dev mailing list