On Tue, Jan 22, 2019 at 6:10 AM Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > > Hi, > > unfortunately there are some more issues with -Waddress-of-packed-member, > that show that my previous > patch was not yet complete. > > That is a bogus warning, in C and C++ (see addition in test case 1), and a > couple of missing warnings > in C++ (test case 2). > > The latter warning regressions were accidentally introduced by my previous > patch, sorry. > > As a side note, the generic tree for an expression like struct.array is > folded differently by > C and C++ FE. While C folds that to &struct.array, C++ folds it to > struct.array, without the > ADDR_EXPR. That might help to explain why this needs to be done in this > slightly confusing way. > > > Fixed the warning regression, and added some more test cases.
While working on it, I noticed that clang didn't warn for many cases. Is that still true today? Thanks. -- H.J.