[gnu.gcc.bug] `gcc' may be producing a spurious warning message.

derek@CAD.BERKELEY.EDU (Derek Clegg) (01/13/90)

/* Version:
 *     gcc version 1.36
 * File:
 *     <this file>
 * Compile with:
 *     gcc -c <this file>
 * Problem:
 *     `gcc' may be producing a spurious warning message.
 * Output:
 *     <this file>: In function foo:
 *     <this file>:27: warning: assignment of pointer from integer lacks a cast
 * Notes:
 *     I would expect that 0 would be silently cast to `(void *)0' in this
 *     context.  However, I may be incorrect.
 *     gcc was compiled with `config.gcc sun3-os4'.
 *     I am using a Sun 3/60 with UNIX 4.2 (Sun release 4.0.1).
 *
 *		Derek B Clegg ({uunet,ucbcad,sun}!island!derek)
 */

void
foo(void)
{
    int k;
    void *v;

    v = ((k = 1), 0);
}