From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15247 invoked by alias); 29 Nov 2012 13:34:03 -0000 Received: (qmail 14998 invoked by uid 48); 29 Nov 2012 13:33:37 -0000 From: "jaak at ristioja dot ee" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/55530] New: Visibility warning not always shown Date: Thu, 29 Nov 2012 13:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: jaak at ristioja dot ee 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" 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-11/txt/msg02879.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55530 Bug #: 55530 Summary: Visibility warning not always shown Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: jaak@ristioja.ee struct __attribute__ ((visibility("internal"))) A {}; struct B { A * a; }; /* warning: 'B' declared with greater visibility than the type of its field 'B::a' [-Wattributes] */ struct C; struct D { B * a; }; /* No warning */ struct __attribute__ ((visibility("internal"))) C {}; Similar behaviour with both gcc and g++. $ gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-ppl-version-check --with-cloog-include=/usr/include/cloog-ppl --enable-lto --disable-nls --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,go,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.8, pie-0.5.2' Thread model: posix gcc version 4.6.3 (Gentoo 4.6.3 p1.8, pie-0.5.2) Please move bug to the appropriate component.