tgmath.h Incompatible with Clang Precompiled Modules

Originator:wetzeal
Number:rdar://15638008 Date Originated:11-Dec-2013
Status:Duplicate/14459641/Open Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:Always
 
Summary:
The macros defined in tgmath.h are not accessible when clang modules (-fmodules) are enabled.

Steps to Reproduce:
1. Write some code that depends on tgmath.h, e.g. CGFloat height =  floor(CGRectGetHeight(self.tableView.frame))
2. Compile the code with clang modules enabled

Expected Results:
Build should succeed using tgmath's type generic math macros.

Actual Results:
Build fails with implicit conversion error, because tgmath's redefinition of floor is not being used.

Version:
Xcode 5.0.2, iOS 7.0, OS X 10.9

Notes:
It looks to me like tgmath.h should be marked excluded in usr/include/module.map like assert.h, instead of as a module, so its macro definitions will correctly clobber the standard library definitions.

Configuration:
Building for iOS Simulator and iOS Devices.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!