5 Aug 20:57
Re: MERGE: bse2cxx-part4
Tim Janik <timj <at> gnu.org>
2011-08-05 18:57:44 GMT
2011-08-05 18:57:44 GMT
On 02.08.2011 14:42, Stefan Westerfeld wrote: > In the bseloader-bsewave.cc code, the next step is to convert that enum value > into an uint type variable. Finally, we switch on the uint value. The thing > that happens is that although the value get_b() returned was 4, the case 3: > code is executed. > > Now one might say that b never had the value 4 in the first place (as you > say due to narrowing the assignment to the possible enum choices), but a > printf on b's value confirms that its in fact 4. Are you saing that GTokenType var; can hold a value *other* than the possible enum values, but that narrowing occours: - not when reading it out by printf (shows "other") - not when assigning var ot an int (assigns "other") - only when assigning var to a uint (assigns a close enum value) ? That sounds utterly broken to me. If at all, I'd expect the narrowing to occour on the *assignment*of*var*. > Have you tried make report on your machine yet? Nope, I thought our normal tests run by make check or installcheck are good enough to trigger this? I'm running make report only close to releases because the suite takes so long with it, any progress on the bsescm speedups btw? ;) >> What do you mean, why is compilation with gcc-4.5 not allowed? > > Well, you can try, but g++-4.5 will stop compiling with these error messages.(Continue reading)
RSS Feed