D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6279 - Regression(2.054 beta): array-vararg with pointer type not working in safe code
Summary: Regression(2.054 beta): array-vararg with pointer type not working in safe code
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2011-07-09 19:10 UTC by Michel Fortin
Modified: 2011-07-10 11:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michel Fortin 2011-07-09 19:10:27 UTC
This code doesn't work in @safe mode because of some compiler-generated code not being @safe:

@safe:

void foo(string[] val...) {
}

void main() {
	foo("a", "b"); // Error: variable voidinitvararg.main.__arrayArg3 void initializers for pointers not allowed in safe functions
}