1 Φεβ 2022, 19:26 Από matz....@frakked.de:

> This is deceptive!  The GNU libc headers unconditionally define 
> '__attribute__()' to nothing if the compiler isn't GCC, and not just 
> internally, so a declaration like:
>
> #include <stdio.h>
> ....
>
>  int __attribute__((whatever!)) avar;
>
> doesn't set any attribute at all :-/  Either do:
>
> #undef __attribute__
>
> after including all standard headers, or use the other form of that token:
>
>  int __attribute((cleanup(clean_up))) avar = 1;
>
>
> Ciao,
> Michael.
>
What the fuck? Why I didn't knew about this? Why isn't this mentioned anywhere 
(or is it and I'm just blind?)? This is a whole game changer!!!!

And I just blamed TCC for letting us compile code that does nothing without 
warning us. I offer a HUGE apology!

I'm sorry TCC developers!

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to