This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "fall-through" errors


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]