public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* STL warnings recently appeared in the 3.0 branch
@ 2001-06-14  6:15 Sylvain Pion
  2001-06-14  7:46 ` Alexandre Oliva
  2001-06-14 18:42 ` Loren James Rittle
  0 siblings, 2 replies; 6+ messages in thread
From: Sylvain Pion @ 2001-06-14  6:15 UTC (permalink / raw)
  To: gcc

Since very recently (about one week), I get a _lot_ of warnings like the
following with -W -Wall -pedantic :

.../include/g++-v3/bits/stl_alloc.h:494:
warning: aggregate has a partly bracketed initializer
.../include/g++-v3/bits/stl_alloc.h:494:
warning: aggregate has a partly bracketed initializer
.../include/g++-v3/bits/stl_alloc.h:494:
warning: missing initializer for member
   `_pthread_mutex::<anonymous struct>::__pthread_mutex_type'
.../include/g++-v3/bits/stl_alloc.h:494:
warning: missing initializer for member
   `_pthread_mutex::__pthread_mutex_lock'
.../include/g++-v3/bits/stl_alloc.h:494:
warning: missing initializer for member
   `_pthread_mutex::__pthread_mutex_data'

I don't get them on GNU-Linux, but they appear on Solaris.

-- 
Sylvain

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

* Re: STL warnings recently appeared in the 3.0 branch
  2001-06-14  6:15 STL warnings recently appeared in the 3.0 branch Sylvain Pion
@ 2001-06-14  7:46 ` Alexandre Oliva
  2001-06-14 18:42 ` Loren James Rittle
  1 sibling, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2001-06-14  7:46 UTC (permalink / raw)
  To: Sylvain Pion; +Cc: gcc

On Jun 14, 2001, Sylvain Pion <Sylvain.Pion@sophia.inria.fr> wrote:

> .../include/g++-v3/bits/stl_alloc.h:494:
> warning: aggregate has a partly bracketed initializer

> I don't get them on GNU-Linux, but they appear on Solaris.

IIRC, this is a bug in Solaris' headers.  The initializer for mutexes
defined in some header file triggers this warning.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: STL warnings recently appeared in the 3.0 branch
  2001-06-14  6:15 STL warnings recently appeared in the 3.0 branch Sylvain Pion
  2001-06-14  7:46 ` Alexandre Oliva
@ 2001-06-14 18:42 ` Loren James Rittle
  2001-06-15  6:32   ` Sylvain Pion
  1 sibling, 1 reply; 6+ messages in thread
From: Loren James Rittle @ 2001-06-14 18:42 UTC (permalink / raw)
  To: gcc; +Cc: Sylvain.Pion

[Note to Dave: all threaded configurations of STL for Solaris use
 __GTHREAD_MUTEX_INIT.]

> Since very recently (about one week), I get a _lot_ of warnings like the
> following with -W -Wall -pedantic :
> .../include/g++-v3/bits/stl_alloc.h:494: [...]
> I don't get them on GNU-Linux, but they appear on Solaris.

Thank you for this bug report.  However, it was filed in the wrong
place and without enough details.  Please file a GNATS report, if at
all possible (see http://gcc.gnu.org ) since then we won't lose your
report.

In your report please include *all* output from ``g++ -v''.  And a
small test case, if possible (the preprocessed version should also be
uploaded when the GNATS report is filed).

For example:

; /usr/local/beta-gcc/bin/g++ -v
Reading specs from /usr/local/beta-gcc/lib/gcc-lib/sparc-sun-solaris2.7/3.0/specs
Configured with: /usr/users/rittle/outside-cvs-src/gcc-3.0/configure --prefix=/usr/local/beta-gcc --disable-libgcj --enable-threads --with-gnu-as --with-as=/usr/local/beta-gcc/bin/as --with-gnu-ld --with-ld=/usr/local/beta-gcc/bin/ld : (reconfigured)  : (reconfigured)  : (reconfigured) 
Thread model: posix
gcc version 3.0 20010612 (prerelease)

; cat t.C
// This example is known to include stl_alloc.h.
#include <vector>

int main () {}

; /usr/local/beta-gcc/bin/g++ -W -Wall -pedantic t.C
;

I.e., this is not a real bug report since I see none of the errors you
have mentioned on my solaris2.7 configuration...
-- 
Loren J. Rittle
Senior Staff Software Engineer, Distributed Object Technology Lab
Networks and Infrastructure Research Lab (IL02/2240), Motorola Labs
rittle@rsch.comm.mot.com, KeyID: 2048/ADCE34A5, FDC0292446937F2A240BC07D42763672

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

* Re: STL warnings recently appeared in the 3.0 branch
  2001-06-14 18:42 ` Loren James Rittle
@ 2001-06-15  6:32   ` Sylvain Pion
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Pion @ 2001-06-15  6:32 UTC (permalink / raw)
  To: Loren James Rittle; +Cc: gcc, Sylvain.Pion

On Thu, Jun 14, 2001 at 08:42:04PM -0500, Loren James Rittle wrote:
> > Since very recently (about one week), I get a _lot_ of warnings like the
> > following with -W -Wall -pedantic :
> > .../include/g++-v3/bits/stl_alloc.h:494: [...]
> > I don't get them on GNU-Linux, but they appear on Solaris.
> 
> Thank you for this bug report.  However, it was filed in the wrong
> place and without enough details.  Please file a GNATS report, if at
> all possible (see http://gcc.gnu.org ) since then we won't lose your
> report.

Sorry about that.
I've just filed it in GNATS as PR 3195.

-- 
Sylvain

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

* Re: STL warnings recently appeared in the 3.0 branch
       [not found] <no.id>
@ 2001-06-14  9:58 ` John David Anglin
  0 siblings, 0 replies; 6+ messages in thread
From: John David Anglin @ 2001-06-14  9:58 UTC (permalink / raw)
  To: John David Anglin; +Cc: gcc, aoliva, Sylvain.Pion

> On Jun 14, 2001, Sylvain Pion <Sylvain.Pion@sophia.inria.fr> wrote:

> > .../include/g++-v3/bits/stl_alloc.h:494:
> > warning: aggregate has a partly bracketed initializer

> > I don't get them on GNU-Linux, but they appear on Solaris.

> IIRC, this is a bug in Solaris' headers.  The initializer for mutexes
> defined in some header file triggers this warning.

If you are using solaris threads (gthr-solaris.h), the system headers
(thread.h) are supposed to define DEFAULTMUTEX.  If they don't, the
initializer is broken and the STL mutex locking won't work properly.
The integration of GTHREADS into v3 is new which is why your seeing
the warning.  My previous comments probably don't apply to solaris.

The file gthr-solaris.h may need to check to see if DEFAULTMUTEX is
defined.  If it isn't then, some fallback is needed.  This could be
defining DEFAULTMUTEX, or using __GTHREAD_ONCE_INIT_FUNCTION instead
of __GTHREAD_ONCE_INIT.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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

* Re: STL warnings recently appeared in the 3.0 branch
@ 2001-06-14  8:32 John David Anglin
  0 siblings, 0 replies; 6+ messages in thread
From: John David Anglin @ 2001-06-14  8:32 UTC (permalink / raw)
  To: gcc; +Cc: aoliva, Sylvain.Pion

> .../include/g++-v3/bits/stl_alloc.h:494:
> warning: aggregate has a partly bracketed initializer

The warning should be harmless.  However to squelch, a define is
needed for __GTHREAD_MUTEX_INIT_DEFAULT if you are using a thread
package that defines __GTHREAD_MUTEX_INIT_FUNCTION.  I have installed
an appropriate one in gthr-dce.h.  However, defines are needed for
gthr-rtems.h and gthr-win32.h.  If you know how the mutex type
is defined for these, it would be greatly be appreciated if a
patch could be developed and tested.

Let me know if you are not using either of these thread models because
this would point to a problem in defining __STL_MUTEX_INITIALIZER in
stl_threads.h.

You have to be careful building v3 because copies of gthr.h and the
gthr* file go into the v3 build tree.  Upates to these files in the
gcc directory may not cause the files in the v3 build tree to update.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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

end of thread, other threads:[~2001-06-15  6:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-14  6:15 STL warnings recently appeared in the 3.0 branch Sylvain Pion
2001-06-14  7:46 ` Alexandre Oliva
2001-06-14 18:42 ` Loren James Rittle
2001-06-15  6:32   ` Sylvain Pion
2001-06-14  8:32 John David Anglin
     [not found] <no.id>
2001-06-14  9:58 ` John David Anglin

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).