[swift-evolution] [Discussion]: Renaming #line, the line control statement

Chris Lattner clattner at apple.com
Thu Feb 4 17:01:50 CST 2016


On Feb 4, 2016, at 10:38 AM, Adrian Prantl <aprantl at apple.com> wrote:
> 
>> 
>> #setsyntacticsourcelocation
>> 
>> or something. :-)
> 
> Is compatibility with the C preprocessor and other preprocessors that emit #line directives a non-goal for Swift?
> I guess we probably don’t want to encourage (ab-)use of the C preprocessor and one could easily translate #line directives to Swift’s syntax by preprocessing the preprocessor output with sed, but I’m curious.

It is a non-goal.  “clang -E” generates a ton of weird forms that we don’t want or need to support.

-Chris


More information about the swift-evolution mailing list