autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_C_RESTRICT


From: Albert Chin
Subject: Re: AC_C_RESTRICT
Date: Fri, 31 Mar 2006 14:40:14 -0600
User-agent: Mutt/1.5.6i

On Fri, Mar 31, 2006 at 02:25:51PM -0600, Albert Chin wrote:
> Autoconf 2.59 chooses __restrict on HP-UX 11.x. Indeed, the following
> works:
>   $ cat a.c
> void
> foo (int var) {
>   float * __restrict x;
> }
> 
> However, this fails:
>   $ cat a.c
> void
> foo (int __restrict var) {
>   float * __restrict x;
> }
>   $ cc -c a.c
> cc: "a.c", line 2: error 1671: Illegal use of restrict.
> 
> Should AC_C_RESTRICT be updated to include a function call with
> restrict in the parameter list to catch the above?

Sorry, this is better:
  $ cat a.c
typedef int * int_ptr;

void
foo (int_ptr __restrict rp) {
  int i;
}
  $ cc -c a.c
cc: "a.c", line 4: error 1671: Illegal use of restrict.

If I replace the parameter list with "int *" rather than "int_ptr",
then it works. Compiler bug?

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]