This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Why does gcc allow implicit conversion from const T* to T* (in C)?
- From: Andrew Haley <aph at redhat dot com>
- To: Sebastian Mach <phresnel at googlemail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 05 May 2009 16:01:46 +0100
- Subject: Re: Why does gcc allow implicit conversion from const T* to T* (in C)?
- References: <7f0369b60905050136j3fae2c81ucdfa289d89c87ba6@mail.gmail.com>
Sebastian Mach wrote:
> Now my questions are:
> 0) Is gcc just liberal?
> 0.yes) Why?
> 0.no) Which would be the relevant section of the standard?
One thing that you may have missed is that the standard doesn't say
anything about warnings or errors. When it says a translator must
issue a diagnostic, then that can be either a warning or an error.
Andrew.