Backports fix from upstream to allow __FUNCTION__ and
__PRETTY_FUNCTION__ to be used as C string literals.
Reviewed-on: https://github.com/dlang/dmd/pull/12923
PR d/101441
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd
f8c1ca928.
-1d8386a63d412c9e77728b0b965025ac4dd40b75
+f8c1ca928360dd8c9f2fbb5771e2a5e398878ca0
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
s = "";
Expression *e = new StringExp(loc, const_cast<char *>(s));
e = expressionSemantic(e, sc);
- e = e->castTo(sc, type);
+ e->type = Type::tstring;
return e;
}
Expression *e = new StringExp(loc, const_cast<char *>(s));
e = expressionSemantic(e, sc);
- e = e->castTo(sc, type);
+ e->type = Type::tstring;
return e;
}
--- /dev/null
+module b19002;
+
+void printf(scope const char* format){}
+
+void main()
+{
+ printf(__FILE__);
+ printf(__FILE_FULL_PATH__);
+ printf(__FUNCTION__);
+ printf(__PRETTY_FUNCTION__);
+ printf(__MODULE__);
+}