[Top][All Lists]

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

Re: AC 2.59/2.57: AC_C_CONST breaks with -Wcast-qual -pedantic-errors on

From: Paul Eggert
Subject: Re: AC 2.59/2.57: AC_C_CONST breaks with -Wcast-qual -pedantic-errors on GCC 2.95.
Date: 21 Jan 2004 23:02:08 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Matthias Andree <address@hidden> writes:

> | /* HPUX 7.0 cc rejects these. */
> | ++ccp;
> > p = (char**) ccp;
> | ccp = (char const *const *) p;
> | { /* SCO 3.2v4 cc rejects this.  */
> ...
> I wonder if this bogus (char **)ccp can be dropped from the test.

I don't see why it's bogus.  The C standard permits it, as far as I
can see.  C99 says (in section paragraph 7) that a pointer to
an object or incomplete type may be converted to a pointer to a
different object or incomplete type, so long as the resulting pointer
is correctly aligned.  It appears that you are invoking GCC in such a
way that it no longer conforms to the C standard with respect to

reply via email to

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