C standard doesn't say anything about void pointer increment. If you will do sizeof(void) ,I guess your gcc compiler will give you 1 as output. In C, for compatibility with the old implementation (where void * were used in place of char * and vice-versa) doing this will not result in error on some compilers. Result is undefined and you should avoid depending upon them.
On Jun 24, 6:01 pm, himanshu kansal <[email protected]> wrote: > one more...gcc allows void ptr to be assigned to and frm any type of ptr w/o > any cast.... > bt vc gvs an error and requires an explicit cast... > whots d specifications abt ds as conforming to c standards...... > On Fri, Jun 24, 2011 at 6:25 PM, himanshu kansal < > > [email protected]> wrote: > > can v increment d void pointer.... > > its perfectly valid on gcc.... > > bt it gives me an error on vc.... > > so is it allowed by c standard or its an extension provided by gnu??? > > -- > > Regards > Himanshu Kansal > Msc Comp. sc. > (University of Delhi) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
