I am on FreeBSD 6.3, using clang 3.1 to build wireshark. I am getting the following error during compile. The question is, what purpose is -Wc++-compat playing? Should it really be turned on here? I am actually tempted to remove "
asked 08 Oct '13, 13:25 tdprime edited 17 Oct '13, 16:04 Guy Harris ♦♦ |
2 Answers:
The purpose behind having that flag turned on was to allow C++ compilers to be used to compile Wireshark. During the initial cleanup to make that possible, a number of latent bugs were also discovered and fixed. The flag was then turned on to avoid re-introducing incompatibilities. See Wireshark bug #8416 for more details on the why and how. In your case, it looks as though you have a C++ incompatible system file. You could either modify that file (or perhaps see if there is a newer version that someone else has already fixed?) or temporarily remove the flag from your compilation. If you think this is an issue that will affect other FreeBSD users, you might consider filing a bug report in bugzilla. answered 08 Oct '13, 13:38 beroset |
I ran into this as well. I worked around it by removing answered 17 Oct '13, 14:19 Gerald Combs ♦♦ edited 17 Oct '13, 16:14 |
I have forwarded the following fix to the people of the libsmi project:
/ SmiElement -- an item in a list (row index column, notification object) / typedef struct SmiElement { +#ifdef clang + char dummy; / CLANG complains about this with -WC++-compat / +#endif #ifndef GNUC char dummy; / many compilers are unhappy with empty structures. / #endif / no visible attributes / } SmiElement;
(I give up on formatting this.....)