epsilon-devel
[Top][All Lists]
Advanced

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

Re: support for other compilers


From: Bruno Haible
Subject: Re: support for other compilers
Date: Tue, 24 Jan 2023 19:17:12 +0100

Hi Luca,

> For the future I am considering defining
> __attribute__(...) and attribute(...) to expand to nothing on compilers
> different from GCC and Clang.
> 
> What do you think, Bruno?

Yes, definitely this is a first step if you intend to support other compilers.

Also, older versions of GCC and clang, that give warnings about unknown
attributes, should better not be fed these attributes. But here it already
becomes complicated, because support for the various attributes was
introduced in different versions and the __has_attribute compiler-builtin
is not always reliable. And because Oracle Studio 12.6 mishandles some
attributes although __has_attribute for it says it should work.

You find in Gnulib's m4/gnulib-common.m4 (lines 73..463) a set of attribute
macro definitions that take of these complexities.

Bruno






reply via email to

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