swiftlang/swift
Auf GitHub ansehen[SR-2403] Recognize __builtin_{huge_val,inf,nan}() macros
Open
#45.010 geöffnet am 18. Aug. 2016
bugc interopc/c++ macroscompilergood first issue
Repository-Metriken
- Stars
- (69.989 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 8T 17h) (510 gemergte PRs in 30 T)
Beschreibung
| Previous ID | SR-2403 |
| Radar | rdar://problem/19051485 |
| Original Reporter | @belkadan |
| Type | Bug |
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, ClangImporter, Macros, StarterBug |
| Assignee | None |
| Priority | Medium |
md5: c8e64f9c66f50b498cedbe9171dcc5a6
Issue Description:
__builtin_huge_val(), __builtin_nan(""), and __builtin_inf() are often used to define macros that evaluate to IEEE infinity or NaN. We could recognize these patterns and import them as aliases for Double.infinity/nan (or mark them unavailable in favor of the native Swift type properties).