NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-m68k/58794: fenv.h leaks <m68k/fpreg.h> into the namespace
>Number: 58794
>Category: port-m68k
>Synopsis: fenv.h leaks <m68k/fpreg.h> into the namespace
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-m68k-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 30 19:35:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The M68kBSD Fenvation
>Environment:
>Description:
For the definitions of the floating-point exception bits and rounding modes FE_*, m68k fenv.h includes <m68k/fpreg.h> which defines various FPSR_* and FPCR_* constants. This namespace pollution is not allowed by C99; the numbers should be copied, or the names defined by <m68k/fpreg.h> and used by fenv.h should be _FPSR_*/_FPCR_* or __FPSR_*/__FPCR_* so they are reserved to the implementation by the standard.
>How-To-Repeat:
1. code inspection
2. write a program that defines its own constants FPSR_*/FPCR_* which aren't token-by-token identical to the NetBSD ones
>Fix:
Yes, please!
Home |
Main Index |
Thread Index |
Old Index