Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-03-07 Thread Evan Huus
On Tue, Feb 12, 2013 at 12:01 PM, Evan Huus wrote: > On Mon, Feb 11, 2013 at 12:26 PM, Evan Huus wrote: >> On Mon, Feb 11, 2013 at 11:01 AM, Dirk Jagdmann wrote: >>> To me the biggest advantage of transitioning to a C++ compiler is the >>> availability of std::string and std::list, std::set, std

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-16 Thread Ed Beroset
Evan Huus wrote: If we do plan to migrate we will definitely be using only C-style constructs to start. It will be enough work transitioning compilers without changing language constructs at the same time. I've created a patch which implements one small part of this and have attached it to ht

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Evan Huus
On Tue, Feb 12, 2013 at 4:53 PM, Gerald Combs wrote: > On 2/12/13 1:17 PM, Jaap Keuter wrote: >> On 02/11/2013 06:36 PM, Evan Huus wrote: >>> Moving just to a C++ compiler shouldn't cause problems for anybody. >>> While C++ isn't technically a superset of C, it is trivial for C >>> programmers to

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Evan Huus
On Tue, Feb 12, 2013 at 5:00 PM, Jaap Keuter wrote: > On 02/12/2013 10:53 PM, Gerald Combs wrote: >> On 2/12/13 1:17 PM, Jaap Keuter wrote: >>> On 02/11/2013 06:36 PM, Evan Huus wrote: Moving just to a C++ compiler shouldn't cause problems for anybody. While C++ isn't technically a super

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Jaap Keuter
On 02/12/2013 10:53 PM, Gerald Combs wrote: > On 2/12/13 1:17 PM, Jaap Keuter wrote: >> On 02/11/2013 06:36 PM, Evan Huus wrote: >>> Moving just to a C++ compiler shouldn't cause problems for anybody. >>> While C++ isn't technically a superset of C, it is trivial for C >>> programmers to avoid the

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Gerald Combs
On 2/12/13 1:17 PM, Jaap Keuter wrote: > On 02/11/2013 06:36 PM, Evan Huus wrote: >> Moving just to a C++ compiler shouldn't cause problems for anybody. >> While C++ isn't technically a superset of C, it is trivial for C >> programmers to avoid the few areas of incompatibility (as far as I >> know

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Jaap Keuter
On 02/11/2013 06:36 PM, Evan Huus wrote: > Moving just to a C++ compiler shouldn't cause problems for anybody. > While C++ isn't technically a superset of C, it is trivial for C > programmers to avoid the few areas of incompatibility (as far as I > know there are simply a few more reserved words li

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Evan Huus
On Tue, Feb 12, 2013 at 12:01 PM, Evan Huus wrote: > On Mon, Feb 11, 2013 at 12:26 PM, Evan Huus wrote: >> On Mon, Feb 11, 2013 at 11:01 AM, Dirk Jagdmann wrote: >>> To me the biggest advantage of transitioning to a C++ compiler is the >>> availability of std::string and std::list, std::set, std

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-12 Thread Evan Huus
On Mon, Feb 11, 2013 at 12:26 PM, Evan Huus wrote: > On Mon, Feb 11, 2013 at 11:01 AM, Dirk Jagdmann wrote: >> To me the biggest advantage of transitioning to a C++ compiler is the >> availability of std::string and std::list, std::set, std::map. They are so >> much >> more convinient to use tha

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Evan Huus
On Mon, Feb 11, 2013 at 6:42 PM, Ed Beroset wrote: > Evan Huus wrote: >> >> On Mon, Feb 11, 2013 at 1:47 PM, Guy Harris >> wrote: > > >>> Note all the lines flagged with "[-Wc++-compat]"; those are for >>> code that's valid C but not valid C++ and that would have to be >>> fixed in order to compi

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Ed Beroset
Evan Huus wrote: On Mon, Feb 11, 2013 at 1:47 PM, Guy Harris wrote: Note all the lines flagged with "[-Wc++-compat]"; those are for code that's valid C but not valid C++ and that would have to be fixed in order to compile with a C++ compiler (unless there's a "let valid C code that *could* be

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Evan Huus
On Mon, Feb 11, 2013 at 1:47 PM, Guy Harris wrote: > > On Feb 11, 2013, at 8:01 AM, Dirk Jagdmann wrote: > >> To me the biggest advantage of transitioning to a C++ compiler is the >> availability of std::string and std::list, std::set, std::map. They are so >> much >> more convinient to use than

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Jakub Zawadzki
On Mon, Feb 11, 2013 at 12:36:52PM -0500, Evan Huus wrote: > Moving just to a C++ compiler shouldn't cause problems for anybody. > While C++ isn't technically a superset of C, it is trivial for C > programmers to avoid the few areas of incompatibility (as far as I > know there are simply a few more

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Guy Harris
On Feb 11, 2013, at 8:01 AM, Dirk Jagdmann wrote: > To me the biggest advantage of transitioning to a C++ compiler is the > availability of std::string and std::list, std::set, std::map. They are so > much > more convinient to use than equivalents from the glib or the alternatives > designed fo

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Evan Huus
On Mon, Feb 11, 2013 at 12:18 PM, Richard Stearn wrote: > A thought from the sidelines. I have contributed to Wireshark, once. > I probably will not contribute again (unless I find another protocol > itch to scratch). This is an observation from scratching that itch. > > Creating suite of dissec

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Richard Stearn
A thought from the sidelines. I have contributed to Wireshark, once. I probably will not contribute again (unless I find another protocol itch to scratch). This is an observation from scratching that itch. Creating suite of dissectors from the skeletons in the development guide was not difficul

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Evan Huus
On Mon, Feb 11, 2013 at 11:01 AM, Dirk Jagdmann wrote: > To me the biggest advantage of transitioning to a C++ compiler is the > availability of std::string and std::list, std::set, std::map. They are so > much > more convinient to use than equivalents from the glib or the alternatives > designed

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-11 Thread Dirk Jagdmann
To me the biggest advantage of transitioning to a C++ compiler is the availability of std::string and std::list, std::set, std::map. They are so much more convinient to use than equivalents from the glib or the alternatives designed for Wireshark. Since the C++ STL classes allow a custom allocator

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-10 Thread Evan Huus
On Sun, Feb 10, 2013 at 9:06 AM, Ed Beroset wrote: > Donald White wrote: >> >> That said, I have some experience with C to C++ transitions. Twice in >> my career, the team I was with was given the job of maintaining legacy >> products written in C (several 100K lines of code) to maintain and >> e

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-10 Thread Ed Beroset
Donald White wrote: That said, I have some experience with C to C++ transitions. Twice in my career, the team I was with was given the job of maintaining legacy products written in C (several 100K lines of code) to maintain and enhance. In both cases, our first step was to recompile with a C++

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-10 Thread martin.r.mathieson
I am not sure about starting to make use of C++ features, but what I do find useful is maintaining a g++ build for a fairly large codebase I maintain. I have never even tried to run the resulting binary, but it catches certain errors that the C compiler does not. The most useful one is that C++

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-09 Thread Donald White
On 2/9/2013 3:24 PM, Evan Huus wrote: On Sat, Feb 9, 2013 at 1:50 PM, Guy Harris wrote: (Subject line changed to match what you presumably intended.) Yes, thank you. On Feb 9, 2013, at 6:41 AM, Evan Huus wrote: This just occurred to me as I was reading an article on GCC (which has recently

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-09 Thread Evan Huus
On Sat, Feb 9, 2013 at 1:50 PM, Guy Harris wrote: > > (Subject line changed to match what you presumably intended.) Yes, thank you. > On Feb 9, 2013, at 6:41 AM, Evan Huus wrote: >> This just occurred to me as I was reading an article on GCC (which has >> recently migrated to using a C++ compil

Re: [Wireshark-dev] Idle Thought - Compiling with C++

2013-02-09 Thread Guy Harris
(Subject line changed to match what you presumably intended.) On Feb 9, 2013, at 6:41 AM, Evan Huus wrote: > This just occurred to me as I was reading an article on GCC (which has > recently migrated to using a C++ compiler, despite still being mostly > written in C). I haven't given it a great