Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-06 Thread Andreas Tobler
On 06.05.20 22:27, Kamil Rytarowski wrote: On 06.05.2020 22:25, Andreas Tobler wrote: On 06.05.20 22:12, Jakub Jelinek wrote: On Wed, May 06, 2020 at 09:54:47PM +0200, Andreas Tobler wrote: --- a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c +++ b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c @@ -

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-06 Thread Kamil Rytarowski
On 06.05.2020 22:25, Andreas Tobler wrote: > On 06.05.20 22:12, Jakub Jelinek wrote: >> On Wed, May 06, 2020 at 09:54:47PM +0200, Andreas Tobler wrote: >>> --- a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c >>> +++ b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c >>> @@ -1,5 +1,6 @@ >>> -#include >>>

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-06 Thread Andreas Tobler
On 06.05.20 22:12, Jakub Jelinek wrote: On Wed, May 06, 2020 at 09:54:47PM +0200, Andreas Tobler wrote: --- a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c +++ b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c @@ -1,5 +1,6 @@ -#include - +#include It needs to be: +#if __has_include() +#include

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-06 Thread Jakub Jelinek via Gcc-patches
On Wed, May 06, 2020 at 09:54:47PM +0200, Andreas Tobler wrote: > --- a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c > +++ b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c > @@ -1,5 +1,6 @@ > -#include > - > +#include It needs to be: > +#if __has_include() +#include > +#endif __has_include doesn

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-06 Thread Andreas Tobler
On 04.05.20 12:10, Kamil Rytarowski wrote: On 04.05.2020 12:04, Jakub Jelinek wrote: On Mon, May 04, 2020 at 11:49:27AM +0200, Kamil Rytarowski wrote: Please include in your patch "|| defined(__NetBSD__)". is this ok for you? This is one reason why I'd prefer #define alloca __builtin_alloca

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-05 Thread Jeff Law via Gcc-patches
On Sun, 2020-05-03 at 22:31 +0200, Andreas Tobler wrote: > On 03.05.20 18:27, Kamil Rytarowski wrote: > > On 01.05.2020 21:49, Andreas Tobler wrote: > > > Hi all, > > > > > > FreeBSD does not have the alloca.h header. Do not include it in the test > > > cases which do include alloca.h. > > > > >

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-04 Thread Kamil Rytarowski
On 04.05.2020 12:04, Jakub Jelinek wrote: > On Mon, May 04, 2020 at 11:49:27AM +0200, Kamil Rytarowski wrote: Please include in your patch "|| defined(__NetBSD__)". >>> >>> is this ok for you? >>> >>> This is one reason why I'd prefer #define alloca __builtin_alloca and >>> leave the include a

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-04 Thread Jakub Jelinek via Gcc-patches
On Mon, May 04, 2020 at 11:49:27AM +0200, Kamil Rytarowski wrote: > >> Please include in your patch "|| defined(__NetBSD__)". > > > > is this ok for you? > > > > This is one reason why I'd prefer #define alloca __builtin_alloca and > > leave the include away. > > > > Andreas > > It looks fi

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-04 Thread Kamil Rytarowski
On 03.05.2020 22:31, Andreas Tobler wrote: > On 03.05.20 18:27, Kamil Rytarowski wrote: >> On 01.05.2020 21:49, Andreas Tobler wrote: >>> Hi all, >>> >>> FreeBSD does not have the alloca.h header. Do not include it in the test >>> cases which do include alloca.h. >>> >>> There are two versions of t

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-03 Thread Andreas Tobler
On 03.05.20 18:27, Kamil Rytarowski wrote: On 01.05.2020 21:49, Andreas Tobler wrote: Hi all, FreeBSD does not have the alloca.h header. Do not include it in the test cases which do include alloca.h. There are two versions of this patch available, the one attached which uses ifdef or another o

Re: [PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-03 Thread Kamil Rytarowski
On 01.05.2020 21:49, Andreas Tobler wrote: > Hi all, > > FreeBSD does not have the alloca.h header. Do not include it in the test > cases which do include alloca.h. > > There are two versions of this patch available, the one attached which > uses ifdef or another one which defines alloca with __b

[PATCH] testsuite:analyzer: Fix header include for FreeBSD

2020-05-01 Thread Andreas Tobler
Hi all, FreeBSD does not have the alloca.h header. Do not include it in the test cases which do include alloca.h. There are two versions of this patch available, the one attached which uses ifdef or another one which defines alloca with __builtin_alloca. I tested both approaches and they wo