Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

warning: conversion from `pointer to void'

4 views
Skip to first unread message

Olaf Dietrich

unread,
Apr 18, 2008, 5:17:58 AM4/18/08
to
#if 0

The following example code compiled with

$ lcc -c fp.c -o fp.o

produces these warnings:

fp.c:2: warning: conversion from `pointer to void' to `pointer to int function(int)' is compiler dependent
fp.c:3: warning: conversion from `pointer to void' to `pointer to int function(int)' is compiler dependent

I wonder if this is required or justified by the C89 or C99
standard. (E.g. "gcc -Wall -pedantic -ansi" does not complain.)

Olaf

#endif

#include <stdlib.h>
int (*func1)(int) = NULL;
int (*func2)(int) = (void *)0;

0 new messages