https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44263
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |msebor at gcc dot gnu.org Known to work| |4.5.3, 7.1.0 Resolution|--- |FIXED Summary|missing diagnostic on |[7/8/9 Regression] missing |questionable array sizes |diagnostic on questionable |with -pedantic |array sizes with -pedantic Known to fail| |4.6.0 --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- I think the report here is specifically about the missing C++ warning. r230365 restored the pedantic warning: r230365 | jason | 2015-11-13 19:08:05 -0500 (Fri, 13 Nov 2015) | 59 lines Merge C++ delayed folding branch. The diagnostic was an ancient regression introduced in GCC 4.6. Prior to that, GCC gave errors: In function 'void foo()': pr44263.c:12:52: error: size of array 'g' is not an integral constant-expression pr44263.c:13:46: error: size of array 'h' is not an integral constant-expression The most likely revision of those identified by my bisection was r159800: r159800 | ebotcazou | 2010-05-24 18:03:09 -0400 (Mon, 24 May 2010) | 3 lines PR middle-end/44100 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.