154. Missing double specifier for do_get()

Section: 25.4.2.1.2 [facet.num.get.virtuals] Status: TC1 Submitter: Dietmar Kühl Opened: 1999-07-20 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [facet.num.get.virtuals].

View all issues with TC1 status.

Discussion:

The table in paragraph 7 for the length modifier does not list the length modifier l to be applied if the type is double. Thus, the standard asks the implementation to do undefined things when using scanf() (the missing length modifier for scanf() when scanning doubles is actually a problem I found quite often in production code, too).

Proposed resolution:

In 25.4.2.1.2 [facet.num.get.virtuals], paragraph 7, add a row in the Length Modifier table to say that for double a length modifier l is to be used.

Rationale:

The standard makes an embarrassing beginner's mistake.