Redefining stdlib functions
- Dominant language
- C++
- Stars
- 3k
- Forks
- 352
- PR merge metrics
- No merged PRs in 30d
Description
The following code does not raise any warning or error:
```ispc
uniform float log(uniform float a) {}
void test() { log(3.4); }
```
This is rather surprising and bug-prone since it is not clear which function is called: the user one or the one of the stdlib.
More surprising: I do not see any generated code for the user `log` function here. It looks like it is **silently ignored**.
This is not the case if I replace the name `log` by `mlog`: in this case, some assembly code is properly generated for `mlog`.
As a result, I think this is a bug and an error should be reported in this case. If ignoring the user function is an expected behavior, then a warning should be raised (something that can be ideally disabled by power-users then).
Contributor guide
Assessment
This issue has not been assessed yet.