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
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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 */
#endif
```

Which eliminates any attribute declaration on preprocessing.

Do you have a workaround or solution for this??

Jimmy Aguilar Mena <ergus>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

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

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code