From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3021 invoked by alias); 29 Oct 2012 19:19:18 -0000 Received: (qmail 2929 invoked by uid 48); 29 Oct 2012 19:18:59 -0000 From: "hak1r at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/55125] New: declaration of the struct's array Date: Mon, 29 Oct 2012 19:19: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hak1r at yahoo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 X-SW-Source: 2012-10/txt/msg02742.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55125 Bug #: 55125 Summary: declaration of the struct's array Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: hak1r@yahoo.com Created attachment 28564 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D28564 at the requests of workers :) 1. gcc version hak1r@HPBM ~/Dropbox/progs $ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=3Dfile:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=3Dc,c++,fortran,objc,obj-c++ --prefix=3D/usr --program-suffix=3D-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --with-gxx-include-dir=3D/usr/include/c++/4.6 --libdir=3D/usr/lib --enable-nls --with-sysroot=3D/ --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-gnu-unique-= object --enable-plugin --enable-objc-gc --enable-targets=3Dall --disable-werror --with-arch-32=3Di686 --with-tune=3Dgeneric --enable-checking=3Drelease --build=3Di686-linux-gnu --host=3Di686-linux-gnu --target=3Di686-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)=20 2. system info hak1r@HPBM ~/Dropbox/progs $ uname -a Linux HPBM 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 i686 i686 i386 GNU/Linux 3. and my trick hak1r@HPBM ~/Dropbox/progs $ gcc main.c=20 main.c: In function =E2=80=98main=E2=80=99: main.c:9:9: warning: initialization from incompatible pointer type [enabled= by default] main.c:9:9: warning: (near initialization for =E2=80=98(anonymous)=E2=80=99= ) [enabled by default] main.c:9:9: warning: excess elements in scalar initializer [enabled by defa= ult] main.c:9:9: warning: (near initialization for =E2=80=98(anonymous)=E2=80=99= ) [enabled by default] main.c:7:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Preprocessed source stored into /tmp/ccUJNmU4.out file, please attach this = to your bugreport. 4. source file main.c: 1 #include 2=20 3 int main(int argc, char **argv) { 4 const struct { 5 char foo; 6 const char **bar; 7 } baz[] =3D { 8 { 'a', (const char **){ NULL } }, 9 { 'b', (const char **){ "qux", NULL } } 10 }; 11 return 0; 12 } 13