Bug 82510

Summary: C compiler ignores user definition of log
Product: gcc Reporter: Doug Wiedemann <doug>
Component: cAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 4.8.5   
Target Milestone: ---   
Host: x86_64 linux Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: compile with "gcc -O0 log-bug.c" - it should print 2.5 when run.

Description Doug Wiedemann 2017-10-10 22:49:59 UTC
Created attachment 42338 [details]
compile with "gcc -O0 log-bug.c" - it should print 2.5 when run.

When I define my own "log" function in a C program the one defined in math.h
is used, even when I don't include math.h.
Comment 1 Andrew Pinski 2017-10-11 02:03:01 UTC
Use -fno-builtins as log as an identifier is reserved.
Comment 2 Andrew Pinski 2017-10-11 02:03:08 UTC
Use -fno-builtins as log as an identifier is reserved.