[Issue 22343] importC: Error: 'undefined identifier' with implicit declaration of function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 7 00:26:12 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22343
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla at digitalmars.com
Resolution|--- |INVALID
--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
Although implicit function declarations used to be Standard, they are not as of
C99. They are still allowed by clang and gcc, but:
cc -c test.c -std=c99 -pedantic-errors
will correctly yield:
error: implicit declaration of function `func`
Implicit function declarations are a terrible, bug-prone feature that has been
outlawed for over 20 years.
Note that clang at least warns on it.
Some discussion:
https://stackoverflow.com/questions/9182763/implicit-function-declarations-in-c/9182835
--
More information about the Digitalmars-d-bugs
mailing list