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 ([EMAIL PROTECTED])
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf