Bug 28845 - ld-monetary.c should be updated to match ISO C and other standards.
Summary: ld-monetary.c should be updated to match ISO C and other standards.
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: locale (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: 2.36
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 28861 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-01 14:18 UTC by Carlos O'Donell
Modified: 2022-02-25 12:38 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos O'Donell 2022-02-01 14:18:11 UTC
In ./locale/programs/ld-monetary.c we have copied some text that appears in monetary_finish() which is taken from other categories, but which does not apply from a standards perspective.

ISO C's localeconf function requires that various members that can be returned are allowed to be empty strings "", and so we should not issue warnings for those cases (7.11.2.3).

This was discovered while harmonizing the C.UTF-8 locale:
https://sourceware.org/pipermail/libc-alpha/2022-February/135955.html
Comment 1 Andreas Schwab 2022-02-03 20:19:33 UTC
*** Bug 28861 has been marked as a duplicate of this bug. ***
Comment 2 Florian Weimer 2022-02-03 20:30:08 UTC
localedef -i C -f UTF-8 C.UTF-8

now fails with:

[error] LC_MONETARY: value for field `mon_decimal_point' must not be an empty string
[error] no output file produced because errors were issued

It turns out we ignore errors during the glibc build (--quiet -c).
Comment 3 Carlos O'Donell 2022-02-03 22:18:14 UTC
(In reply to Florian Weimer from comment #2)
> localedef -i C -f UTF-8 C.UTF-8
> 
> now fails with:
> 
> [error] LC_MONETARY: value for field `mon_decimal_point' must not be an
> empty string
> [error] no output file produced because errors were issued
> 
> It turns out we ignore errors during the glibc build (--quiet -c).

I have a patch in hand for this.
Comment 4 Carlos O'Donell 2022-02-05 02:57:37 UTC
(In reply to Carlos O'Donell from comment #3)
> (In reply to Florian Weimer from comment #2)
> > localedef -i C -f UTF-8 C.UTF-8
> > 
> > now fails with:
> > 
> > [error] LC_MONETARY: value for field `mon_decimal_point' must not be an
> > empty string
> > [error] no output file produced because errors were issued
> > 
> > It turns out we ignore errors during the glibc build (--quiet -c).
> 
> I have a patch in hand for this.

Posted:
https://sourceware.org/pipermail/libc-alpha/2022-February/136161.html
Comment 5 Carlos O'Donell 2022-02-25 12:38:42 UTC
This is now fixed for glibc 2.36.