On 05/05/2014, at 7:17 PM, srean wrote: > Then I found a bug, and I curse that moronic stupid idiotic C++ language. > > here's the constructor for a gc profile: > > gc_profile_t::gc_profile_t ( > bool debug_driver_, > bool debug_allocations_, > > and here the actual initialisation: > > gcp = new flx::gc::generic::gc_profile_t( > c, > c->debug_allocations, > > shouldnt the typechecker cried foul when c got passed instead of a bool ?
No, there's an implicit conversion from pointers to bool. So that this C code remains valid: if (p) { printf("Not NULL\n"); else { printf("NULL\n"); And of course Felix switches off a lot of optional diagnostics because typical compiler writers assume programmers are idiots and report all sorts of rubbish as possible mistakes. Worse, stupid people doing GCC change the diagnostics every version and the compiler stupidly bugs out if you use inappropriate warning switches .. something I complained about and got told "that's not the gcc way". Clang does it right: warning controls it doesn't understand are ignored. Of course this isn't because they're smarter, its because clang wouldn't be compatible with "gcc" otherwise (they'd need a clang version for every gcc version). In any case, i fixed it, but it has no impact. Which is weird because it SHOULD have switched driver debugging on all the time. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language