bugTiny C Compiler - Bugs: bug #57056, TCC attributes ignored due to...


bug #57056: TCC attributes ignored due to glibc header definition.

Submitter:  Jimmy Aguilar Mena <ergus>
Submitted:  Mon 14 Oct 2019 11:23:27 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Tue 29 Nov 2022 06:33:03 PM UTC, comment #1: 

Use _attribute instead of __attribute_ or add
#undef _attribute_ after last include file.

Herman ten Brugge <hermantb>
Mon 14 Oct 2019 11:23:27 AM UTC, original submission:  

I have found that the attributes are ignored when using any include from glibc (stdlib, stdio...). compiling with -E shows that the attributed are deleted.

The problem is actually that sys/cdefs.h (included by features.h which is included by almost all the other headers) have this code:

/* GCC has various useful declarations that can be made with the
   `__attribute__' syntax.  All of the ways we use this do fine if
   they are omitted for compilers that don't understand it. */
#if !defined _GNUC_ || _GNUC_ < 2
# define _attribute_(xyz) /* Ignore */

Which eliminates any attribute declaration on preprocessing.

Do you have a workaround or solution for this??

Jimmy Aguilar Mena <ergus>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hermantb (Posted a comment)
  • -email is unavailable- added by ergus (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-c373.
    Corresponding source code