bug-mit-scheme
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change "microcode: Use fallthrough attribute on clang 10 and 11 too.


From: Chris Hanson
Subject: Re: change "microcode: Use fallthrough attribute on clang 10 and 11 too." broke the build for me
Date: Sun, 14 Feb 2021 16:10:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

OK, we have to treat the Apple clang differently.

Prior to v12 no attribute is necessary as there are no warnings for falling through. Starting with v12 the usual attribute is required and works.

I'll make the change and cherry-pick to release-11, unless you want to do it.

On 2/14/21 2:10 PM, Taylor R Campbell wrote:
Date: Sun, 14 Feb 2021 21:24:56 +0000 (UTC)

The problem appears to be between clang 11 and 12. In v11, the
attribute isn't recognized, and in v12 it is.

Changing the conditional to __clang_major__ >= 12 fixes the problem
on macos.

Taylor, why did you choose 10 instead?
I verified that __attribute__((__fallthrough__)) works with clang
10.0.1 -- example program attached (fails with -Wimplicit-fallthrough
-Werror, works if I uncomment the line).

Not supporting the attribute seem to be a quirk of Apple's version of
clang, from what I can tell.  What _does_ work in Apple's toolchain to
selectively suppress -Wimplicit-fallthrough warnings?


$ clang --version
clang version 10.0.1
Target: x86_64-unknown-netbsd9.0
Thread model: posix
InstalledDir: /pkg/2020Q3/bin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]