From: H. P. A. <hp...@zy...> - 2013-12-13 22:17:39
|
On 12/13/2013 12:40 PM, Ed Beroset wrote: > >> Yes, it would be good if we could compile with a C++ compiler. It >> shouldn't be all that hard to do, but I think I tried it at one point >> and it will need some help. > > It's not trivial, but it's more tedious than difficult and often results > in better code anyway. We used gcc with the -Wc++-compat option to help > identify the problem areas. When I did that with the wireshark project, > I found the following: > > type count percent > implicit_casts 4013 81.58% > keyword_use 634 12.89% > enum_conversion 197 4.00% > uninit_const 7 0.14% > field_typedef 5 0.10% > special_operator 3 0.06% > incompat_ptr 2 0.04% > other 58 1.18% > > Because the vast majority of these (over 98%) were of only three > different kinds which are mostly trivial fixes, it didn't take that long > to plow through the entire project. I haven't done this (and don't > realistically have the time for it) on the NASM project, but I would > strongly suspect a similar pattern. > Enum conversion and void casts dominate in NASM. This is unfortunately rather painful to work through. -hpa |