gcc abusive builtins ?

Mason slash.tmp@free.fr
Mon Dec 4 10:10:00 GMT 2017


On 30/11/2017 15:31, phi gcc wrote:

> I got the picture, I will be as despotic as gcc is :) I will setup a
> uniq global setup in our Makefile -fno-builtin-exp2, it should not
> really hurt because I don't think we have place where we really meant
> we wanted the math.h version, and on the spot force #define exp2(x)
> __builtin_exp2((x)) when one really want to do math.

Many identifiers are reserved for the implementation.

Redefining them in your own code is asking for trouble down the line, IMO.

http://c-faq.com/decl/namespace.html
https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier

"All identifiers with external linkage (including future library directions)
and errno are always reserved for use as identifiers with external linkage."

Regards.



More information about the Gcc-help mailing list