Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-28 Thread FX Coudert
> But isn't the bigger issue that sys/types.h isn't guaranteed to contain > a declaration of ssize_t? And that when sys/types.h isn't available > we don't get ssize_t from it either? Some targets seem to get it indirectly from stdio.h As far as I know, darwin is the only platform broken

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-27 Thread FX Coudert
Among the review comments from the last round, Jakub suggested: > Perhaps libgccjit.h could use > #ifdef __has_include > #if __has_include () > #include > #endif > #endif > instead of just #include . I’m not sure it’s necessary since other headers treat as always available, but I suppose it

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Andreas Schwab
On Jun 11 2024, Iain Sandoe wrote: > well, afaict, all the code is c++ and we are building with a std >= 11, so > that > presumes c99 support. The C standard does not define ssize_t at all, it is only part of POSIX. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread FX Coudert
> While stdio.h can be relied on to exist I do not think you can assume > the same for sys/types.h without "configury", but libgccjit.h is an > installed API. sys/types.h is already included unconditionally in gcc/system.h and gcc/tsystem.h. The later says: /* All systems have this header. */

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Jakub Jelinek
On Tue, Jun 11, 2024 at 10:06:49AM +0200, Richard Biener wrote: > > approrpiate #define _POSIX_C_SOURCE or #define _XOPE_SOURCE befor the > > include in case somebody builds with -std=c99? > > Oh, and the manpage says that also defines ssize_t which > is a bit odd since we already include that

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Andreas Schwab
On Jun 11 2024, Richard Biener wrote: >> Don't you also need to add >> >> approrpiate #define _POSIX_C_SOURCE or #define _XOPE_SOURCE befor the >> include in case somebody builds with -std=c99? Such feature macros can only be defined before the very first include of a system header. > Oh, and

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Iain Sandoe
> On 11 Jun 2024, at 09:06, Richard Biener wrote: > > On Tue, 11 Jun 2024, Richard Biener wrote: > >> On Tue, 11 Jun 2024, Iain Sandoe wrote: >> >>> >>> On 11 Jun 2024, at 08:44, Jakub Jelinek wrote: On Tue, Jun 11, 2024 at 09:27:37AM +0200, Richard Biener wrote: > On

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Richard Biener
On Tue, 11 Jun 2024, Richard Biener wrote: > On Tue, 11 Jun 2024, Iain Sandoe wrote: > > > > > > > > On 11 Jun 2024, at 08:44, Jakub Jelinek wrote: > > > > > > On Tue, Jun 11, 2024 at 09:27:37AM +0200, Richard Biener wrote: > > >> On Tue, 11 Jun 2024, FX Coudert wrote: > > >> > > >>> Hi > >

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Richard Biener
On Tue, 11 Jun 2024, Iain Sandoe wrote: > > > > On 11 Jun 2024, at 08:44, Jakub Jelinek wrote: > > > > On Tue, Jun 11, 2024 at 09:27:37AM +0200, Richard Biener wrote: > >> On Tue, 11 Jun 2024, FX Coudert wrote: > >> > >>> Hi > >>> > >>> I can’t seem to get a review of this one-line patch.

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Iain Sandoe
> On 11 Jun 2024, at 08:44, Jakub Jelinek wrote: > > On Tue, Jun 11, 2024 at 09:27:37AM +0200, Richard Biener wrote: >> On Tue, 11 Jun 2024, FX Coudert wrote: >> >>> Hi >>> >>> I can’t seem to get a review of this one-line patch. Could a global >>> reviewer help? >> >> While stdio.h can

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Jakub Jelinek
On Tue, Jun 11, 2024 at 09:27:37AM +0200, Richard Biener wrote: > On Tue, 11 Jun 2024, FX Coudert wrote: > > > Hi > > > > I can’t seem to get a review of this one-line patch. Could a global > > reviewer help? > > While stdio.h can be relied on to exist I do not think you can assume > the same

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Richard Biener
On Tue, 11 Jun 2024, FX Coudert wrote: > Hi > > I can’t seem to get a review of this one-line patch. Could a global reviewer > help? While stdio.h can be relied on to exist I do not think you can assume the same for sys/types.h without "configury", but libgccjit.h is an installed API. I would

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Xi Ruoyao
On Sat, 2024-05-11 at 17:16 +0200, FX Coudert wrote: > * libgccjit.h: Include Per the C standard size_t should be provided by stddef.h. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread FX Coudert
Hi I can’t seem to get a review of this one-line patch. Could a global reviewer help? Thanks, FX ping**3 > Le 11 mai 2024 à 17:16, FX Coudert a écrit : > > Hi, > > On some targets it seems that ssize_t is not defined by any of the headers > transitively included by . This leads to a

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-01 Thread FX Coudert
ping**2 for this one-liner > Le 11 mai 2024 à 17:16, FX Coudert a écrit : > > Hi, > > On some targets it seems that ssize_t is not defined by any of the headers > transitively included by . This leads to a bootstrap fail when jit > is enabled. The attached patch fixes it by include . Other

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-05-26 Thread FX Coudert
ping > Le 11 mai 2024 à 17:16, FX Coudert a écrit : > > Hi, > > On some targets it seems that ssize_t is not defined by any of the headers > transitively included by . This leads to a bootstrap fail when jit > is enabled. The attached patch fixes it by include . Other > headers in GCC

[PATCH] jit: Ensure ssize_t is defined.

2024-05-11 Thread FX Coudert
Hi, On some targets it seems that ssize_t is not defined by any of the headers transitively included by . This leads to a bootstrap fail when jit is enabled. The attached patch fixes it by include . Other headers in GCC treat as available on all targets, so we include it unconditionally.

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-05-02 Thread FX Coudert
I’d like to ping the patch at https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644134.html The original proposal by Iain was: diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 235cab053e0..db4f27a48bf 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -21,6 +21,9 @@

Ping: [PATCH] jit: Ensure ssize_t is defined.

2024-04-02 Thread Iain Sandoe
> On 29 Jan 2024, at 11:26, Iain Sandoe wrote: > I guess the solution here depends on the scope over which we expect > the header to be used. > >> On 28 Jan 2024, at 23:13, Iain Sandoe wrote: >>> On 28 Jan 2024, at 21:25, Eric Gallager wrote: >>> On Sun, Jan 28, 2024 at 6:45 AM Iain Sandoe

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-01-29 Thread Iain Sandoe
Hi David, I guess the solution here depends on the scope over which we expect the header to be used. > On 28 Jan 2024, at 23:13, Iain Sandoe wrote: >> On 28 Jan 2024, at 21:25, Eric Gallager wrote: >> On Sun, Jan 28, 2024 at 6:45 AM Iain Sandoe wrote: >>> >>> Tested on i686, x86_64 Darwin,

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-01-28 Thread Iain Sandoe
> On 28 Jan 2024, at 21:25, Eric Gallager wrote: > > On Sun, Jan 28, 2024 at 6:45 AM Iain Sandoe wrote: >> >> Tested on i686, x86_64 Darwin, x86_64 Linux, >> OK for trunk? >> >> --- 8< --- >> >> On some targets it seems that ssize_t is not defined by any of the >> headers transitively

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-01-28 Thread Eric Gallager
On Sun, Jan 28, 2024 at 6:45 AM Iain Sandoe wrote: > > Tested on i686, x86_64 Darwin, x86_64 Linux, > OK for trunk? > > --- 8< --- > > On some targets it seems that ssize_t is not defined by any of the > headers transitively included by . This leads to a bootstrap > fail when jit is enabled. > >

[PATCH] jit: Ensure ssize_t is defined.

2024-01-28 Thread Iain Sandoe
Tested on i686, x86_64 Darwin, x86_64 Linux, OK for trunk? --- 8< --- On some targets it seems that ssize_t is not defined by any of the headers transitively included by . This leads to a bootstrap fail when jit is enabled. The fix proposed here is to include sys/types.h when it is available