A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=700 ====================================================================== Reported By: fbauzac Assigned To: ajosey ====================================================================== Project: 1003.1(2008)/Issue 7 Issue ID: 700 Category: System Interfaces Type: Clarification Requested Severity: Comment Priority: normal Status: Under Review Name: Fabrice Bauzac Organization: User Reference: Section: strtoul Page Number: na Line Number: na Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2013-05-19 18:12 UTC Last Modified: 2023-02-16 16:41 UTC ====================================================================== Summary: Clarify strtoul's behaviour on strings representing negative numbers ======================================================================
---------------------------------------------------------------------- (0006150) nick (manager) - 2023-02-16 16:41 https://austingroupbugs.net/view.php?id=700#c6150 ---------------------------------------------------------------------- During the 2022-02-13 - 2022-02-17 meeting, WG14 accepted paper https://www.open-std.org/jtc1/sc22/WG14/www/docs/n3107.pdf (16 in favor, 0 against, 0 abstains). The C23 standard contain the following change: <blockquote> Replace the following sentence from Subclause 7.24.1.7, “The strtol, strtoll, strtoul, and strtoull functions” paragraph 5: <blockquote> If the subject sequence begins with a minus sign, the value resulting from the conversion is negated (in the return type). </blockquote> with: <blockquote> If the subject sequence begins with a minus sign, the resulting value is the negative of the converted value; for functions whose return type is an unsigned integer type this action is performed in the return type. </blockquote> Replace the following sentence from Subclause 7.31.4.1.4, “The wcstol, wcstoll, wcstoul, and wcstoull functions” paragraph 5: <blockquote> If the subject sequence begins with a minus sign, the value resulting from the conversion is negated (in the return type). </blockquote> with: <blockquote> If the subject sequence begins with a minus sign, the resulting value is the negative of the converted value; for functions whose return type is an unsigned integer type this action is performed in the return type. </blockquote> </blockquote> Issue History Date Modified Username Field Change ====================================================================== 2013-05-19 18:12 fbauzac New Issue 2013-05-19 18:12 fbauzac Status New => Under Review 2013-05-19 18:12 fbauzac Assigned To => ajosey 2013-05-19 18:12 fbauzac Name => Fabrice Bauzac 2013-05-19 18:12 fbauzac Section => strtoul 2013-05-19 18:12 fbauzac Page Number => na 2013-05-19 18:12 fbauzac Line Number => na 2013-05-23 16:27 msbrown Project 1003.1(2004)/Issue 6 => 1003.1(2008)/Issue 7 2014-04-03 16:22 geoffclare Tag Attached: c99 2023-02-16 16:41 nick Note Added: 0006150 ======================================================================