Defect Report #440

Previous Defect Report < - > Next Defect Report


Submitter: Joseph Myers
Submission Date: 2013-07-21
Source: WG 14
Reference Document: N1730
Version: 1.0
Date: October 2013
Subject: Floating-point issues in C11 from PDTS 18661-1 UK review, Issue 1

Summary

Some issues with floating point in C11 have been identified as part of the UK review of the N1711 draft of TS 18661-1. While such issues relate to the general area of C bindings to IEC 60559:2011, and so could be addressed in the TS on that basis, since the issues also apply to C11 as-is it may be more appropriate to address some or all of these issues as Defect Reports with a view to having a normative fix in a future TC to C11 rather than only having a fix in conjunction with the new bindings.

Issue 1: Choice of long double in Annex F

Annex F provides various choices for the long double type (which may or may not be an IEC 60559 type), but no method is provided for an application to determine which choice has been made.

If a macro is provided to say whether the type is an IEC 60559 type, all the other properties can be determined from the existing <float.h> macros. So, a sufficient fix would be:

In 5.2.4.2.2, insert a new paragraph after paragraph 10: Whether a type matches an IEC 60559 type is characterized by the implementation-defined values of FLT_IS_IEC_60559, DBL_IS_IEC_60559, and LDBL_IS_IEC_60559:

Oct 2013 meeting

Proposed Committee Response

A long double is not an existing type and cannot be added by the mechanism of a defect report.


Previous Defect Report < - > Next Defect Report