[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: restrict
From: |
Jason Stover |
Subject: |
Re: restrict |
Date: |
Sun, 4 Feb 2007 21:46:49 -0500 |
User-agent: |
Mutt/1.5.10i |
I have this line in config.h:
#define restrict __restrict
...but config.h isn't included in string.h.
-Jason
On Mon, Feb 05, 2007 at 07:48:20AM +0900, John Darrington wrote:
> On Sun, Feb 04, 2007 at 11:45:25AM -0800, Ben Pfaff wrote:
> Jason Stover <address@hidden> writes:
>
> > The latest checkout of gnulib puts a a couple of restricted
> > qualifiers in declarations in string.h. This breaks the OBSD
> > build with gcc 3.3.5.
> >
> > restrict is part of c99, right?
> >
> > So gcc 3.3.5 is breaking because it doesn't know about
> > restrict?
> >
> > Shouldn't a portability library not bother with what seems like a kind
> > of optimization that restrict is for? I mean, isn't that a decision
> > best left to the compiler?
>
> The configure script is supposed to detect whether the compiler
> supports the "restrict" keyword. If it doesn't, it should add
> the line
> #define restrict
> to config.h, so that any use of restrict is dropped by the
> preprocessor.
>
> Can you check whether your config.h defines restrict this way?
> If it doesn't, then we should figure out why. If it does, then
> the most likely problem is that the source file or files that
> trigger the error are forgetting to #include <config.h> at the
> top. Every PSPP source file should #include <config.h> as the
> first thing it does.
>
> But it seems that the offending file in this case is gl/memmem.c
> I think this ought to have
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> at its head. So perhaps this problem should be discussed on the
> gnulib list.
>
> J'
>
> --
> PGP Public key ID: 1024D/2DE827B3
> fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
> See http://pgp.mit.edu or any PGP keyserver for public key.
>
>