patchGNU Autoconf Archive - Patches: patch #8260, Macros to check GCC-compatible...

 
 

patch #8260: Macros to check GCC-compatible built-in functions, function and variable attributes

Submitted by:  None
Submitted on:  Mon 16 Dec 2013 04:28:54 PM UTC  
 
Priority: 5 - NormalStatus: Done
Assigned to: Peter Simons <simons>Originator Email: -unavailable-
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 19 Dec 2013 07:31:51 PM UTC, comment #1:

I've pushed these submissions in cba04c6..bd4346f. Thank you very much for the patch!

Peter Simons <simons>
Project AdministratorIn charge of this item.
Mon 16 Dec 2013 04:28:54 PM UTC, original submission:

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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by simons (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Feb 2014 10:29:35 AM UTCsimonsStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Thu 19 Dec 2013 07:31:51 PM UTCsimonsStatusNone=>Ready For Test
      Assigned toNone=>simons
    Mon 16 Dec 2013 04:28:54 PM UTCNoneAttached File-=>Added 0001-Add-a-macro-for-checking-GCC-compatible-built-in-fun.patch, #29974
      Attached File-=>Added 0003-Add-a-macro-to-check-GCC-compatible-variable-attribu.patch, #29975
      Attached File-=>Added 0002-Add-a-macro-for-checking-GCC-compatible-function-att.patch, #29976

    Back to the top


    Powered by Savane 3.1-cleanup