On Wed, 30 Oct 2024, Jakub Jelinek wrote: > Hi! > > Apparently autoconf defines the HAVE_DECL_* macros to 0 > rather than not defining them at all, so defined(HAVE_DECL_FMEMOPEN) > test doesn't do much. > > The following patch fixes it by testing HAVE_DECL_FMEMOPEN > for being non-zero instead. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK. > 2024-10-30 Jakub Jelinek <ja...@redhat.com> > > PR middle-end/117348 > * genmatch.cc: Replace defined(HAVE_DECL_FMEMOPEN) > test with HAVE_DECL_FMEMOPEN. > > --- gcc/genmatch.cc.jj 2024-10-27 16:44:30.792004967 +0100 > +++ gcc/genmatch.cc 2024-10-29 18:04:52.888907269 +0100 > @@ -585,7 +585,7 @@ diag_vfprintf (FILE *f, int err_no, cons > fprintf (f, "%s", q); > } > > -#if defined(GENMATCH_SELFTESTS) && defined(HAVE_DECL_FMEMOPEN) > +#if defined(GENMATCH_SELFTESTS) && HAVE_DECL_FMEMOPEN > #pragma GCC diagnostic push > #pragma GCC diagnostic ignored "-Wsuggest-attribute=format" > > > Jakub > > -- Richard Biener <rguent...@suse.de> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)