From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11571 invoked by alias); 17 Jul 2015 21:54:57 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11536 invoked by uid 48); 17 Jul 2015 21:54:53 -0000 From: "vlad at petric dot cc" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66921] New: failure to determine size of static constexpr array that is nested within a templated class Date: Fri, 17 Jul 2015 21:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vlad at petric dot cc X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01582.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66921 Bug ID: 66921 Summary: failure to determine size of static constexpr array that is nested within a templated class Product: gcc Version: 4.9.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vlad at petric dot cc Target Milestone: --- Created attachment 36010 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D36010&action=3Dedit straightforward file (include-less) that fails to compile template struct Holder { constexpr static const int array[] =3D { 1, 2, 3 }; enum {F =3D array[0]}; }; class HI: public Holder {}; gcc 4.9.3/Centos linux. $ g++ -std=3Dc++11 ./x.cc -o x.o -c ./x.cc: In instantiation of =E2=80=98constexpr const int Holder::array= []=E2=80=99: ./x.cc:4:18: required from =E2=80=98struct Holder=E2=80=99 ./x.cc:7:18: required from here ./x.cc:3:30: error: initializer fails to determine size of =E2=80=98Holder<= int>::array=E2=80=99 constexpr static const int array[] =3D { 1, 2, 3 }; ^ ./x.cc:3:30: error: array must be initialized with a brace-enclosed initial= izer ./x.cc: In instantiation of =E2=80=98struct Holder=E2=80=99: ./x.cc:7:18: required from here ./x.cc:4:8: error: enumerator value for =E2=80=98F=E2=80=99 is not an integ= er constant enum {F =3D array[0]}; * with gcc 4.8.3, it compiles just fine. * if I remove the template, it also compiles just fine: struct Holder { constexpr static const int array[] =3D { 1, 2, 3 }; enum {F =3D array[0]}; }; class HI: public Holder {}; >>From gcc-bugs-return-492693-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jul 17 22:00:37 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 16747 invoked by alias); 17 Jul 2015 22:00:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 16703 invoked by uid 48); 17 Jul 2015 22:00:33 -0000 From: "egall at gwmail dot gwu.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/28492] -Wmissing-format-attribute causes warning for vsnprintf() Date: Fri, 17 Jul 2015 22:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: minor X-Bugzilla-Who: egall at gwmail dot gwu.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01583.txt.bz2 Content-length: 1193 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D28492 Eric Gallager changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egall at gwmail dot gwu.edu --- Comment #4 from Eric Gallager --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #3) > OK, I see that the warning is misleading, because it points to the call of > vsnprintf instead of pointing to vsnprintf_one. >=20 > ttest.c: In function =E2=80=98vsnprintf_one=E2=80=99: > ttest.c:826:5: warning: function might be possible candidate for > =E2=80=98gnu_printf=E2=80=99 format attribute [-Wmissing-format-attribute] > vsnprintf(self, 2, "%c", arglist); > ^ Same thing with the other members of the vprintf family of functions, such = as vfprintf... I remember getting particularly confused by this one in the past and hacking together some really ugly workarounds to deal with it, when all= I really needed to do was to put the format attribute on the calling function, instead of trying to re-declare vfprintf... >>From gcc-bugs-return-492694-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jul 17 22:24:11 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 37454 invoked by alias); 17 Jul 2015 22:24:11 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 37335 invoked by uid 48); 17 Jul 2015 22:24:07 -0000 From: "mhw at netris dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/57271] ARM: gcc generates insufficient alignment for memory passed as extra argument for function return large composite type Date: Fri, 17 Jul 2015 22:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: mhw at netris dot org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01584.txt.bz2 Content-length: 494 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271 Mark H Weaver changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mhw at netris dot org --- Comment #10 from Mark H Weaver --- I've encountered a similar problem, possibly related. See bug #66917 for a minimal C example program exhibiting the problem.