public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/113792] New: error: '__size_t' was not declared in this scope
@ 2024-02-06 22:26 danglin at gcc dot gnu.org
  2024-02-07  7:43 ` [Bug libstdc++/113792] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: danglin at gcc dot gnu.org @ 2024-02-06 22:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113792
           Summary: error: '__size_t' was not declared in this scope
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa64-hp-hpux11.11
            Target: hppa64-hp-hpux11.11
             Build: hppa64-hp-hpux11.11

I enabled building rust on hppa64-hp-hpux11.11 and hit this error:

/home/dave/gnu/gcc/objdir64/./prev-gcc/x
g++ -B/home/dave/gnu/gcc/objdir64/./prev-gcc/
-B/opt/gnu64/gcc/gcc-14/hppa64-hp-
hpux11.11/bin/ -nostdinc++
-B/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.1
1/libstdc++-v3/src/.libs
-B/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/
libstdc++-v3/libsupc++/.libs  -isystem
/home/dave/gnu/gcc/objdir64/prev-hppa64-h
p-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11  -isystem
/home/dave/gnu/gc
c/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/include  -isystem
/home/dave/gn
u/gcc/gcc/libstdc++-v3/libsupc++
-L/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hp
ux11.11/libstdc++-v3/src/.libs
-L/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux
11.11/libstdc++-v3/libsupc++/.libs -g -O2 -fno-checking   -c -o punct.o
../../..
/gcc/libgrust/libproc_macro_internal/punct.cc
In file included from
/home/dave/gnu/gcc/gcc-trunk/libstdc++-v3/include/c_global
/cstdlib:79,
                 from ../../../gcc/libgrust/libproc_macro_internal/punct.cc:24:
/usr/include/stdlib.h:349:25: error: '__size_t' was not declared in this scope;
did you mean '__site_t'?
  349 |     extern void *valloc(__size_t);
      |                         ^~~~~~~~
      |                         __site_t
make[4]: *** [<builtin>: punct.o] Error 1
make[4]: Leaving directory
'/home/dave/gnu/gcc/objdir64/libgrust/libproc_macro_internal'
make[3]: *** [Makefile:421: all-recursive] Error 1

This is an #include_next problem.  We have the following in cstdlib:
// Need to ensure this finds the C library's <stdlib.h> not a libstdc++
// wrapper that might already be installed later in the include search path.
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include_next <stdlib.h>
#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS

stdlib.h is fixed on this target.  The #include_next pulled stdlib.h
from /usr/include instead of ./prev-gcc/include-fixed/stdlib.h.

Maybe the fix is to just use #include but I'm not sure.

There are a couple of other places which define
_GLIBCXX_INCLUDE_NEXT_C_HEADERS.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-10 16:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 22:26 [Bug libstdc++/113792] New: error: '__size_t' was not declared in this scope danglin at gcc dot gnu.org
2024-02-07  7:43 ` [Bug libstdc++/113792] " redi at gcc dot gnu.org
2024-02-07 20:57 ` dave.anglin at bell dot net
2024-02-07 21:36 ` redi at gcc dot gnu.org
2024-02-07 21:38 ` redi at gcc dot gnu.org
2024-02-07 21:43 ` redi at gcc dot gnu.org
2024-02-08 15:17 ` danglin at gcc dot gnu.org
2024-02-10 16:33 ` danglin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).