Article View: comp.std.c
Article #4443giving a (*)(const void *) to a (*)(void *)
From: Dominique Marcadet
Date: Thu, 07 Dec 1995 15:51
Date: Thu, 07 Dec 1995 15:51
18 lines
973 bytes
973 bytes
The following code compiles fine without any warning with the latest g++,
but gcc emits a warning and other C compilers say it's an error.
Is it really wrong according to the C standard ?
extern void f (void (*) (void *));
extern void g (const void *);
void h ()
{
f (&g);
}
+------------------------------------------------------------------------+
| Service Informatique Supelec | Dominique.Marcadet@supelec.fr |
| Plateau de Moulon | Tel : +33 1 69 85 14 73 |
| 91192 Gif sur Yvette Cedex - France | Fax : +33 1 69 85 12 34 |
Technical Details
Message-ID:
<Dominique.Marcadet-0712951751160001@marcadet.supelec.fr>Path:
arc1-ca.pugleaf.net!marcadet.supelec.fr!userShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!marcadet.supelec.fr!user From: Dominique.Marcadet@supelec.fr (Dominique Marcadet) Newsgroups: comp.std.c Subject: giving a (*)(const void *) to a (*)(void *) Date: Thu, 07 Dec 1995 17:51:16 +0200 Organization: Supelec, Gif sur Yvette, France Message-ID: <Dominique.Marcadet-0712951751160001@marcadet.supelec.fr> NNTP-Posting-Host: marcadet.supelec.fr