[Bug libstdc++/97088] 17_intro/names.cc and experimental/names.cc fail with --disable-libstdcxx-pch

clyon at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 18 09:25:01 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088

--- Comment #2 from Christophe Lyon <clyon at gcc dot gnu.org> ---
(In reply to joseph@codesourcery.com from comment #1)
> On Thu, 17 Sep 2020, clyon at gcc dot gnu.org wrote:
> 
> > This happens because the testcase does
> > #define x (
> > and "x" is used as parameter names in several function prototypes in newlib's
> > math.h
> 
> That's a bug in newlib, which should be fixed there.

OK, so you mean that prototypes like
extern int __isinff (float x);
should not name their parameters? I can certainly submit the simple patch to
newlib.

Regarding the problem with glibc, the problem is in ucontext.h, where struct
_libc_fpstate is declared as:
struct _libc_fpstate
{
  struct
  {
    unsigned int sign1:1;
    unsigned int unused:15;
    unsigned int sign2:1;
    unsigned int exponent:14;
    unsigned int j:1;
    unsigned int mantissa1:31;
    unsigned int mantissa0:32;
  } fpregs[8];
  unsigned int fpsr:32;
  unsigned int fpcr:32;
  unsigned char ftype[8];
  unsigned int init_flag;
};

The offending field is 'j', because libstdc++'s 17_intro/names.cc defines 'j'
as '('. Do you mean that field should also be renamed? That sounds odd.


More information about the Gcc-bugs mailing list