Skip to content

Commit

Permalink
Add a comment to test_attribute_packed for the false positive warning…
Browse files Browse the repository at this point in the history
… about ignoring the packed attribute
  • Loading branch information
pdimov committed May 17, 2024
1 parent 7cc541d commit 903a146
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_attribute_packed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ int main() {}

using namespace boost::uuids;

// Note: recent GCCs produce the warning
// "ignoring packed attribute because of unpacked non-POD field"
// for X1 and X2, but this is a false positive; the packed attribute
// is not ignored and the tests pass.
//
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114986

struct __attribute__((packed)) X1
{
unsigned char a;
Expand Down

0 comments on commit 903a146

Please sign in to comment.