Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Do we still need/want -Wc++-compat?

From: Evan Huus <eapache@xxxxxxxxx>
Date: Thu, 1 Oct 2015 00:59:27 -0400
On Thu, Oct 1, 2015 at 12:38 AM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
>
> On Sep 30, 2015, at 6:53 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
>
>> I think the intent was to be able to run Wireshark's C code through C++ compilers; I can't find the mail where this was discussed, but, as I remember, the issue was that Microsoft were dragging their feet on C99 support, and we wanted to be able to use at least some features present in both C99 and the versions of C++ supported by the Microsoft compiler.
>>
>> Microsoft have gotten more receptive to C99 features; is this something we still want to contemplate - and to try to keep open as a possibility, by compiling with -Wc++-compat?
>>
>> If I try to build what's currently in master, it fails on my Yosemite machine, with Xcode 7.0.1
>
> Not after rebuilding and reinstalling all the development libraries and doing make maintainer-clean/autogen/configure/make.
>
> But what was the reason for adding checks for C++ compatibility, and does it still apply?

My memory matches yours: it was about MSVC (and other more obscure
compilers we theoretically support, on platforms I have never actually
used**) not having C99 features.

Part of me would like to take a hard line and say: "these are the C99
features we require, deal with it" but I don't know how much screaming
that would entail. Another part of me would like to just switch to use
C++ compilers on all our common platforms and start gradually
introducing some of the useful, not-insanely-complex bits of C++ into
the code-base, but I already know how much screaming that would entail
:P

** `doc/README.developer` references IBM's compiler for AIX as one
which lacks even basic C99 support like // comments.