This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "fall-through" errors
- From: Bruce Korb <bruce dot korb at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC List <gcc at gcc dot gnu dot org>
- Date: Sat, 28 Jul 2018 12:28:55 -0700
- Subject: Re: "fall-through" errors
- References: <CAKRnqNJBqv0_=_t4bs3rx-PH=8iLieqvscmjsDbeArOaAfO5Qw@mail.gmail.com> <20180728174439.GQ17988@tucnak> <CAKRnqNK=AWv8+3w82DBzWZ9cw5S9Zyu7w+_71LkCygm6F60OKA@mail.gmail.com> <20180728184806.GR17988@tucnak>
On Sat, Jul 28, 2018 at 11:48 AM Jakub Jelinek <jakub@redhat.com> wrote:
> You don't need to use configure for this, something like:
> #ifdef __has_attribute
> #if __has_attribute(__noreturn__)
> #define NORETURN __attribute__((__noreturn__))
> #endif
....
OK. Thanks. It _will_ be a bit more complicated because my toy emits
headers for others to compile.
SO, more like:
#ifdef NORETURN
# define _AO_NoReturn NORETURN
#else
<<attribute stuff using _AO_NoReturn>>
#endif
and then emit headers with the _AO_NoReturn marker.
namespaces can be a nuisance.