Re: A: a new bug to old plain C

Andrey Tarasevich via Gcc-help <[email protected]>
Newsgroups gmane.comp.gcc.help
Message-ID <[email protected]>
> > There are lots and lots of 
> > conversions in C that are only available through _explicit_ _casts_
> 
> Where "lots and lots" means "exactly zero": you can always do an
> ssignment to something with an appropriate type.

I'm not sure what you are trying to say here. Constraints of assignment in C are exactly 
as strict as constraints of initialization. (In fact, the later are defined in the standard 
simply by a direct reference to the former.)

So, given the situation in question, you are forced to use either an explicit cast 
or something like the aforementioned `void *` trick. This is as true for assignment 
as it is for initialization.

-- 
Best regards,
Andrey
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.