public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28449]  New: failed to build DSO with STL and hidden visibility enabled
@ 2006-07-20 20:14 ph0enix at ngs dot ru
  2006-07-20 22:02 ` [Bug c++/28449] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: ph0enix at ngs dot ru @ 2006-07-20 20:14 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2671 bytes --]

simplified test-case:
#include <set>

class __attribute__ ((visibility("default"))) foo {
public:
    typedef std::set<int> int_set;
    int_set::const_iterator begin() const;

private:
    int_set m_set;
};

foo::int_set::const_iterator foo::begin() const {
    return m_set.begin();
}

compile it:
$ g++-4.2.0-alpha20060715 -fPIC -shared -Wall -fvisibility=hidden test.cc -o
test.so
test.cc:6: warning: ‘std::_Rb_tree_const_iterator<int> foo::begin() const’
declared with greater visibility than its type
test.cc:3: warning: ‘foo’ declared with greater visibility than the type of
its field ‘foo::m_set’

foo::begin()/m_set are not exported

it can be repaired by adding typedef for const_iterator and placing it and
typedef for set outside of class
or wrapping include
#pragma GCC visibility push(default)
#include <set>
#pragma GCC visibility pop
at this case if client of DSO also includes <set> before including my header -
he will get the same warning as above, but code seems to be working.
so, question is - shouldn't push/pop visibility placed in stl headers?
there were no such problem w/ gcc-4.2.0_alpha20060603

$ g++-4.2.0-alpha20060715 -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/gcc-4.2.0_alpha20060715/work/gcc-4.2-20060715/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.2.0-alpha20060715
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.0-alpha20060715/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.0-alpha20060715
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.0-alpha20060715/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.0-alpha20060715/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.0-alpha20060715/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++
--enable-shared --enable-threads=posix --enable-bootstrap --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 4.2.0-alpha20060715  (experimental) (Gentoo 4.2.0_alpha20060715)


-- 
           Summary: failed to build DSO with STL and hidden visibility
                    enabled
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ph0enix at ngs dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28449


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/28449] failed to build DSO with STL and hidden visibility enabled
  2006-07-20 20:14 [Bug c++/28449] New: failed to build DSO with STL and hidden visibility enabled ph0enix at ngs dot ru
@ 2006-07-20 22:02 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-20 22:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-07-20 22:01 -------


*** This bug has been marked as a duplicate of 19664 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28449


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-20 22:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-20 20:14 [Bug c++/28449] New: failed to build DSO with STL and hidden visibility enabled ph0enix at ngs dot ru
2006-07-20 22:02 ` [Bug c++/28449] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).