[Issue 19002] New: __FUNCTION__ and __PRETTY_FUNCTION__ are not C string literals
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 18 12:38:54 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19002
Issue ID: 19002
Summary: __FUNCTION__ and __PRETTY_FUNCTION__ are not C string
literals
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid, wrong-code
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
void main()
{
import core.stdc.stdio;
printf(__FUNCTION__);
}
Error: function core.stdc.stdio.printf(scope const(char*) format, ...) is not
callable using argument types (string)
__FUNCTION__ should be equivalent to a string literal here. Using __FILE__ or
__MODULE__ works fine.
--
More information about the Digitalmars-d-bugs
mailing list