This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/23984] New: Missing compat versions of err.h and error.h functions for long double = double


https://sourceware.org/bugzilla/show_bug.cgi?id=23984

            Bug ID: 23984
           Summary: Missing compat versions of err.h and error.h functions
                    for long double = double
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: gabriel at inconstante dot eti.br
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 11462
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11462&action=edit
Reproducer

Similar to bug 23983 [1], backwards-compatible versions of the functions: warn,
warnx, vwarn, vwarnx, err, errx, verr, and verrx (from err.h); error and
error_at_line (from error.h) are missing.  Thus, using -mlong-double-64
produces incorrect output on platforms where the default long double format
changed in Glibc 2.4.

For instance, the attached code (based on misc/tst-ldbl-warn.c and
misc/tst-ldbl-error.c) produces the following, incorrect output on a powerpc
machine with Ubuntu 16.04:

$ gcc -mlong-double-64 tst-ldbl-warn-err-error.c && ./a.out
a.out: -1.000000 -- 0.000000
./a.out::0: -1.000000 -- 0.000000

When it produces correct output with "-mlong-double-128":

$ gcc -mlong-double-128 tst-ldbl-warn-err-error.c && ./a.out
a.out: -1.000000 -- -2.000000
./a.out::0: -1.000000 -- -2.000000


[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23983

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]