comparison liboctave/oct-inttypes.h @ 7534:ef755c763b62

avoid more "comparison is always false due to limited range of data type" warnings from GCC
author John W. Eaton <jwe@octave.org>
date Tue, 26 Feb 2008 17:37:37 -0500
parents 6f10bbb2854a
children 6929e40fc597
comparison
equal deleted inserted replaced
7533:ff52243af934 7534:ef755c763b62
197 #define OCTAVE_INT_FIT_TO_RANGE2(r, T1, T2) \ 197 #define OCTAVE_INT_FIT_TO_RANGE2(r, T1, T2) \
198 octave_int_fit_to_range (r, \ 198 octave_int_fit_to_range (r, \
199 OCTAVE_INT_MIN_VAL2 (T1, T2), \ 199 OCTAVE_INT_MIN_VAL2 (T1, T2), \
200 OCTAVE_INT_MAX_VAL2 (T1, T2)) 200 OCTAVE_INT_MAX_VAL2 (T1, T2))
201 201
202 // By using these classes/functions we avoid warnings from GCC about 202 // We have all the machinery below (octave_int_helper) to avoid a few
203 // comparisons always being false due to limited range of data type. 203 // warnings from GCC about comparisons always false due to limited
204 // range of data types. Ugh. The cure may be worse than the disease.
204 205
205 // FIXME -- it would be nice to nest the helper class inside the 206 // FIXME -- it would be nice to nest the helper class inside the
206 // octave_int class, but I don't see the magic for that at the moment. 207 // octave_int class, but I don't see the magic for that at the moment.
207 208
208 template <class T> class octave_int; 209 template <class T> class octave_int;