[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-10 Thread danglin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

John David Anglin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #7 from John David Anglin  ---
Problem disappeared after updating to revision r14-8898-g2bb45562202.

[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-08 Thread danglin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #6 from John David Anglin  ---
Created attachment 57360
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57360=edit
Patch

As far as I can tell, the attached patch does not cause any regressions
on x86-64.  See:
https://gcc.gnu.org/pipermail/gcc-testresults/2024-February/807425.html

Will upload preprocessed source for punct.cc after current build and check
completes on parisc machine.

[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #5 from Jonathan Wakely  ---
https://gcc.gnu.org/pipermail/gcc-patches/2016-January/439448.html described
the reason for the current approach.

[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #4 from Jonathan Wakely  ---
And we have the same pattern in include/c_global/cmath and
include/bits/std_abs.h so I'm also very reluctant to change just one.

[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #3 from Jonathan Wakely  ---
(In reply to John David Anglin from comment #0)
> stdlib.h is fixed on this target.  The #include_next pulled stdlib.h
> from /usr/include instead of ./prev-gcc/include-fixed/stdlib.h.

Why did that happen?

For my systems, the include search list is:

ignoring nonexistent directory
"/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/jwakely/src/benchmark/include/

/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../include/c++/14.0.1

/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../include/c++/14.0.1/x86_64-pc-linux-gnu

/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../include/c++/14.0.1/backward
 /home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/include
 /usr/local/include
 /home/jwakely/gcc/14/include
 /home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/include-fixed
 /usr/include
End of search list.

Why is /usr/include coming before the include-fixed dir? That seems wrong.

I'm extremely reluctant to fiddle with the (historically fragile) ordering
between the  headers and  headers without understanding exactly
what's happening here, and why.

[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-07 Thread dave.anglin at bell dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #2 from dave.anglin at bell dot net ---
On 2024-02-07 2:43 a.m., redi at gcc dot gnu.org wrote:
> Using #include definitely won't work, that would just create a cycle between
> the libstdc++ versions of stdlib.h and cstdlib, at least for all targets that
> don't have stdlib.h in include-fixed.
Are you sure?  The file punct.cc compiles successfully on
hppa-unknown-linux-gnu using #include.
It doesn't have stdlib.h in include-fixed.

Doing a full build.

[Bug libstdc++/113792] error: '__size_t' was not declared in this scope

2024-02-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #1 from Jonathan Wakely  ---
Using #include definitely won't work, that would just create a cycle between
the libstdc++ versions of stdlib.h and cstdlib, at least for all targets that
don't have stdlib.h in include-fixed.