[swift-evolution] [Pitch] #warning
Chris Lattner
clattner at apple.com
Mon May 30 15:35:36 CDT 2016
> On May 29, 2016, at 10:36 PM, Charlie Monroe <charlie at charliemonroe.net> wrote:
>
>> As to #warning, Swift’s use of warnings are significant different than the use in C. In C compilers, many of the warnings produced *should* be errors, but can’t be because that effects language conformance and could break a large body of code.
>
> The example I've mentioned with #error, doesn't necessarily lead to an error, but can just issue a #warning("Untested OS, proceed carefully.") - it IMHO doesn't necessarily be fatal.
This doesn’t make sense to me. If the code is untested, then it should definitely be audited and check if it is enabled. A #error is the perfect approach for this case.
-Chris
More information about the swift-evolution
mailing list