This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/22086] void * dereferenced in sizeof() yields 1


------- Additional Comments From jboone at logitel dot com  2005-06-16 00:03 -------
Subject: Re:  void * dereferenced in sizeof() yields 1

My apologies. And thanks for the polite explanation. I'll wade through 
the man pages and start using a more appropriate set of compile options. 
Thanks,

    - Jared

pinskia at gcc dot gnu dot org wrote:

>------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-15 23:50 -------
>This is a GCC extension. sizeof(void) is invalid C and should error out and does with -pedantic-errors
>
>The reason why it is 1 and not 0 is because it is also a GNU extension that you can increment a void 
>pointer like a char pointer.
>
>  
>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22086


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]