tgmath.h does not work if "Modules" compiler feature is enabled

Originator:Dim1014
Number:rdar://16744288 Date Originated:April 28th 2014
Status:Open Resolved:
Product:Objective C Compiler Product Version:5.1
Classification:Bug Reproducible:100%
 
Summary:
If Modules are enabled, it is impossible to call any of the macros in tgmath.h. Turning them off makes the macros work again.

Steps to Reproduce:
1. Create a sample project.
2. Go to project settings and make sure the "Enable Modules(C and Objective-C" is set to "Yes"
2. In any file, #import <tgmath.h> and add a single line of code calling a function overloaded in tgmath (such as "CGFloat test = round(35.5);").

Expected Results:
 The tgmath round() macro should be called.

Actual Results:
The regular math.h function is called. This can be easily seen by performing cmd+click on the function call to see its declaration. If you go back to the project settings and turn the Modules setting to "Off", the macro starts working instantly and cmd+click takes you to the tgmath declaration

Version:
Version 5.1.1 (5B1008)

Configuration:
This occurs 100% of the time using Xcode 5, with both the iOS SDK and the OS X SDK.

Comments

I've duped this as well 16823745.

I've duped this as well 16823745.

Closed as a duplicate

Engineering has determined that your bug report (16744288) is a duplicate of another issue (14459641) and will be closed.


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!