Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001395 [1003.1(2016/18)/Issue7+TC2] Shell and Utilities Objection Error 2020-08-26 14:36 2020-08-26 15:32
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Geoff Clare
Organization The Open Group
User Reference
Section awk
Page Number 2486
Line Number 79925-79930
Interp Status ---
Final Accepted Text
Summary 0001395: awk radix character in alternative conversion to atof()
Description In POSIX.2-1992 awk was required to convert string values to numeric values by the equivalent of:
setlocale(LC_NUMERIC, "");
numeric_value = atof(string_value);
Later when atof() was required to support hex floating point, "INF", and "NAN", this was changed to make the support of those new things optional in awk by saying the conversion is done either as above or by an alternative conversion that is a description of how atof() used to work in C90.

At least, that's what was intended. Unfortunately, the description of this alternative conversion refers to <period> instead of the radix character.
Desired Action On page 2486 line 79925 section awk, change:
... optionally containing a <period>
to:
... optionally containing a radix character

On page 2486 line 79928 section awk, change:
The sequence starting with the first digit or the <period> (whichever occurs first) is interpreted as a floating constant of the C language, and if neither an exponent part nor a <period> appears, a <period> is assumed to follow the last digit in the string.
to:
The sequence starting with the first digit or the radix character (whichever occurs first) is interpreted as a floating constant of the C language, except that the radix character shall be used in place of a <period>, and if neither an exponent part nor a radix character appears, a radix character is assumed to follow the last digit in the string.

Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0004946)
shware_systems (reporter)
2020-08-26 15:32
edited on: 2020-08-26 15:33

A floating constant of the C language, as a subset of strings in general, does presume <period> is always the radix character, according to the C grammar. POSIX extending the definition, to allow other chars, it seems should be CX shaded, in interface and utility descriptions, or these be reworded to defer directly to strtod(), which has appropriate text and shading already.


- Issue History
Date Modified Username Field Change
2020-08-26 14:36 geoffclare New Issue
2020-08-26 14:36 geoffclare Name => Geoff Clare
2020-08-26 14:36 geoffclare Organization => The Open Group
2020-08-26 14:36 geoffclare Section => awk
2020-08-26 14:36 geoffclare Page Number => 2486
2020-08-26 14:36 geoffclare Line Number => 79925-79930
2020-08-26 14:36 geoffclare Interp Status => ---
2020-08-26 15:32 shware_systems Note Added: 0004946
2020-08-26 15:33 shware_systems Note Edited: 0004946


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker