autoconf-archive-maintainers | |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #8260] Macros to check GCC-compatible built-in functions, functio
From: |
anonymous |
Subject: |
[patch #8260] Macros to check GCC-compatible built-in functions, function and variable attributes |
Date: |
Mon, 16 Dec 2013 16:28:55 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 |
URL:
<http://savannah.gnu.org/patch/?8260>
Summary: Macros to check GCC-compatible built-in functions,
function and variable attributes
Project: GNU Autoconf Archive
Submitted by: None
Submitted on: Mon 16 Dec 2013 04:28:54 PM UTC
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This patch-set adds three macros:
- AX_GCC_BUILTIN(BUILTIN)
This macro is used to detect GCC-compatible built-in functions (e.g.
AX_GCC_BUILTIN([__builtin_expect]) to check for __builtin_expect()). Since
those functions are not treated like normal functions they cannot be checked
using common autoconf macros. The macro description contains the relatively
long list of supported built-ins; unknown built-ins can also be checked but
the result might be wrong or meaningless, the user will be warned in this
case.
- AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
This macro is used to detect GCC-compatible function attributes (e.g.
AX_GCC_FUNC_ATTRIBUTE([pure]) to check for __attribute__((pure))). Using
invalid or unknown attributes usually generates warnings instead of compiler
errors hence this macro provides proper attribute-specific checks to ensure
that the required attribute is correctly supported. The macro header contains
the list of supported attributes. Unknown attributes can also be checked but
the result might be wrong or meaningless, the user will be warned in this
case
- AX_GCC_VAR_ATTRIBUTE(ATTRIBUTE)
This macro is used to detect GCC-compatible variable attributes (e.g.
AX_GCC_VAR_ATTRIBUTE([unused]) to check for __attribute__((unused))). It works
in the same way as the previous one.
The macros all define HAVE_* macros when the checked builtin/attribute is
found and also properly set ax_cv_have_* variables. They have been tested
across multiple versions of GCC and LLVM/clang to ensure that they detect the
available builtins/attributes correctly.
Finally all macros are available under the all-permissive license.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 16 Dec 2013 04:28:54 PM UTC Name:
0001-Add-a-macro-for-checking-GCC-compatible-built-in-fun.patch Size: 6kB
By: None
<http://savannah.gnu.org/patch/download.php?file_id=29974>
-------------------------------------------------------
Date: Mon 16 Dec 2013 04:28:54 PM UTC Name:
0003-Add-a-macro-to-check-GCC-compatible-variable-attribu.patch Size: 5kB
By: None
<http://savannah.gnu.org/patch/download.php?file_id=29975>
-------------------------------------------------------
Date: Mon 16 Dec 2013 04:28:54 PM UTC Name:
0002-Add-a-macro-for-checking-GCC-compatible-function-att.patch Size: 8kB
By: None
<http://savannah.gnu.org/patch/download.php?file_id=29976>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8260>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [patch #8260] Macros to check GCC-compatible built-in functions, function and variable attributes,
anonymous <=