Wireshark mailing list archives
Making gcc less pedantic
From: Gerald Combs <gerald () wireshark org>
Date: Fri, 13 Feb 2015 12:54:32 -0800
Would it make sense to make gcc's "-pedantic" warnings a bit less pedantic, e.g. with "-std=c99"? One of my recent commits changed the type of a bit field from unsigned int to an enum, which results in the following warning: ../epan/frame_data.h:75:5: warning: type of bit-field 'encoding' is a GCC extension [-Wpedantic] packet_char_enc encoding : 1; /**< Character encoding (ASCII, EBCDIC...) */ ^ In this particular case having a "packet_char_enc" encoding instead of an "unsigned int" encoding is useful, otherwise you have to cast back to packet_char_enc further down the line. It also compiles under Clang, Visual C++, and Solaris Studio without warning. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Making gcc less pedantic Gerald Combs (Feb 13)
- Re: Making gcc less pedantic Evan Huus (Feb 13)
- Re: Making gcc less pedantic Guy Harris (Feb 13)