Re: void* vs void *

2016-01-29 Thread Jonathan Wakely
On 29 January 2016 at 18:13, Magnus Fromreide wrote: > I just noticed that the C and C++ compiler output pointer types differently: > > Consider > > int i; > printf("%p", &i); > > When compiled as C that gives the warning > > format '%p' expects argument of type 'void *', but argument 2 has type 'i

Re: void* vs void *

2016-01-29 Thread Marek Polacek
On Fri, Jan 29, 2016 at 07:13:00PM +0100, Magnus Fromreide wrote: > I just noticed that the C and C++ compiler output pointer types differently: > > Consider > > int i; > printf("%p", &i); > > When compiled as C that gives the warning > > format '%p' expects argument of type 'void *', but argum

void* vs void *

2016-01-29 Thread Magnus Fromreide
I just noticed that the C and C++ compiler output pointer types differently: Consider int i; printf("%p", &i); When compiled as C that gives the warning format '%p' expects argument of type 'void *', but argument 2 has type 'int *' but when compiled as C++ it gives the warning format '%p' exp