This is the mail archive of the gcc-patches@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]

Re: [C++] simplify check_for_casting_away_constness


Manuel López-Ibáñez wrote:

> 2007-11-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
> 
>   * typeck.c (check_for_casting_away_constness): Use 1 single
> argument, the type of cast, to decide what diagnostics generate.
>   (build_static_cast_1): Remove unused code. Call
> check_for_casting_away_constness with cast_type 2.
>   (build_reinterpret_cast_1): Call check_for_casting_away_constness
> with cast_type 3.
>   (build_const_cast_1): Call check_for_casting_away_constness with cast_type 1.

As far as I can tell, this isn't a bug fix, so it needs to wait for
Stage 1.  I've not thought about whether this seems like an improvement
or not, but we certainly want an enum, rather than magic numbers, for
the switch values if we do this.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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