A few days ago, Joerg Sonnenberger improved the name space of NetBSD's ctype.h. He added "_CTYPE" before "_U", "_N", etc. The commit message can be seen in http://mail-index.netbsd.org/source-changes/2010/12/14/msg015830.html the change to ctype_bits.h: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/ctype_bits.h.diff?r1=1.1&r2=1.2&only_with_tag=MAIN the change to gcc's ctype_base.h as distributed with NetBSD-current: http://cvsweb.netbsd.org/bsdweb.cgi/src/gnu/dist/gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.diff?r1=1.1&r2=1.2&only_with_tag=MAIN I'd like to see this integrated into one of the next gcc releases. Since all current releases and older development releases of NetBSD (earlier than 5.99.41) still have _U etc. it's probably a bit harder than just taking the change as above. I'm not sure how you want to do that exactly. You can test for the older NetBSD versions with _U etc. with: #include <sys/param.h> #if __NetBSD_Version__ < 599004100 ... #endif
should be easy to do, can you test it if I prepare a patch?
I can test on 5.99.40 and 5.99.41/amd64. Just send me short instructions how to test. Thanks!
Created attachment 22845 [details] check version in config/os/bsd/netbsd/ctype_base.h Does <sys/param.h> get included via <ctype.h> or do I need to include it explicitly? This patch includes it explicitly. To test this you'll need to check out svn trunk (or download the gcc-core and gcc-g++ tarballs from a recent snapshot) and apply this patch in the libstdc++-v3 directory, then build the compiler. Let me know if you need details of how to build the compiler if you don't have the GMP, MPFR and MPC prerequisite libs installed
Building GCC snapshots made easy: http://advogato.org/person/redi/diary/229.html
Are we still waiting for feedback? PS: IMHO, if just <ctype.h> is ok instead of <sys/param.h>, it would be much nicer. Besides that nit, it would be nice to have the tweak in 4.6.0, if we can make it...
GCC 4.6.0 can't be built on NetBSD (PR 47147) so unless that gets fixed there's no way to test the changes, and so I thought no urgency to fix this one I'm happy to commit the changes untested if you want. I tried to check the NetBSD CVS repo to find out if ctype.h includes sys/param.h but I couldn't find the right files
Ah, I didn't know about 47147. Let's wait a bit more then.
Author: redi Date: Thu Jan 13 00:02:41 2011 New Revision: 168732 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168732 Log: 2011-01-13 Jonathan Wakely <jwakely.gcc@gmail.com> PR libstdc++/47045 * config/os/bsd/netbsd/ctype_base.h: Use new macros based on version. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
While testing PR 47147 I was able to verify my patch for this bug allows libstdc++ to build, but I didn't have dejagnu so couldn't run the testsuite. Should be fixed for 4.6.0
Author: kargl Date: Sat Oct 5 15:23:26 2019 New Revision: 276627 URL: https://gcc.gnu.org/viewcvs?rev=276627&root=gcc&view=rev Log: 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/47045 * decl.c (variable_decl): Do not search parent namespace for symbol. 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/47045 * gfortran.dg/pr47054_1.f90: New test * gfortran.dg/pr47054_2.f90: Ditto. Added: trunk/gcc/testsuite/gfortran.dg/pr47054_1.f90 trunk/gcc/testsuite/gfortran.dg/pr47054_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog
(In reply to kargl from comment #10) > Author: kargl > Date: Sat Oct 5 15:23:26 2019 > New Revision: 276627 > > URL: https://gcc.gnu.org/viewcvs?rev=276627&root=gcc&view=rev > Log: > 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> > > PR fortran/47045 > * decl.c (variable_decl): Do not search parent namespace for symbol. > > 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> > > PR fortran/47045 > * gfortran.dg/pr47054_1.f90: New test > * gfortran.dg/pr47054_2.f90: Ditto. > Whoops. Transposes 47054 to 47045. Sorry about that.