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: Arthur A. Gleckler
Subject: Re: change "microcode: Use fallthrough attribute on clang 10 and 11 too." broke the build for me
Date: Thu, 11 Feb 2021 22:07:43 -0800

On Thu, Feb 11, 2021 at 9:54 PM Taylor R Campbell <campbell+mit-scheme@mumble.net> wrote:
Oy.  Can you figure out how Apple's bizarro toolchain wants to see
fallthrough cases marked?  I have no way to do experiments.

I tried all kinds of versions of it I found in the Clang documentation, e.g. "[[clang::fallthrough]];" and "[[fallthrough]];", but none worked.  I'll let you know if I hit upon one that works.
 
Worse comes to worst, I guess I can throw && !defined(__APPLE__) in
there...

Maybe that's the right short-term compromise.  This worked:

#if (((defined (__GNUC__)) && (__GNUC__ >= 7)) || \
       ((defined (__clang__)) && (__clang_major__ >= 10) && !define(__APPLE__)))
#  define FALLTHROUGH() ATTRIBUTE ((__fallthrough__))
#else
#  define FALLTHROUGH() ((void)0)
#endif
 
But now I'm having trouble getting Savannah to let me commit any changes, so I can't push this fix or the one that I originally did the build to test.  Argh.

If this works for you, would you mind committing it?

reply via email to

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