built-in function 'exp' declared as non-function

phi gcc phi.gcc@gmail.com
Thu Apr 11 17:01:00 GMT 2019


Builtin symbols should be namespaced
__exp()

and he one who want the builtin short named could (and I guess the
include math.h) can do that.

#define exp __exp

There is no problem of renaming it because as a user you will never
set a BP into the builtin.

With the reversed logic, compilers (or normalisation I guess)
despotically pick a stdlib function name, decide it become a builtin,
and the one who never used it, but may colide with the symbol, are now
directed toward their rename

#define exp my_exp

That is a pitty because now, some debugger don't know this macro name
so setting BP is a problem (you got to remember the macro expanded
name)

I am not to happy with that.

On this occurence I can manage by declaring my int exp as static, with
some tricks to pass the addr of it to other CU consumers, the beauty
of external static..

How well...



More information about the Gcc-help mailing list