Bug 11365 - initializer problem in stl_threads.h
Summary: initializer problem in stl_threads.h
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.2
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-29 01:34 UTC by Jason James
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
stl_thread.tar.gz (148.80 KB, application/octet-stream)
2003-07-11 14:37 UTC, Jason James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason James 2003-06-29 01:34:18 UTC
When compiling any program on our HP/UX box at school with gcc 3.2, I get
the following warnings:

/usr/local/include/c++/3.2/bits/stl_threads.h: At global scope:
/usr/local/include/c++/3.2/bits/stl_threads.h: In instantiation of `__gthread_mu
tex_t std::_Swap_lock_struct<0>::_S_swap_lock':
/usr/local/include/c++/3.2/bits/stl_threads.h:122:   instantiated from here
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer
/usr/local/include/c++/3.2/bits/stl_threads.h:115: warning: aggregate has a
   partly bracketed initializer

Kinda annoying to me, catastrophic to our first level programming students!
Comment 1 Andrew Pinski 2003-06-29 02:59:33 UTC
Can you read http://gcc.gnu.org/bugs.html and provide a preprocessed source file?
Comment 2 Wolfgang Bangerth 2003-06-30 14:41:31 UTC
This is probably a similar thing as to what happens on Solaris. A case
for fixincludes.

W.
Comment 3 Wolfgang Bangerth 2003-06-30 14:42:45 UTC
Actually, thinking about it: don't send a preprocessed code snippet,
but both the preprocessed and the original code.

Thanks
  Wolfgang
Comment 4 Jason James 2003-07-11 14:37:29 UTC
Subject: Re:  initializer problem in stl_threads.h

Wolfgang and the BugZilla Gang,

(Sorry, couldn't resist...)

On Mon, Jun 30, 2003 at 02:42:45PM -0000, bangerth at dealii dot org wrote:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11365
> 
> ------- Additional Comments From bangerth at dealii dot org  2003-06-30 14:42 -------
> Actually, thinking about it: don't send a preprocessed code snippet,
> but both the preprocessed and the original code.
> 
I'm attaching a tar.gz of the original and the preprocessor output.
The error messages I get are there, too.  And, just in case I didn't
say this (although I swear I did), this only happens under -Wall.

Later,                                                 Jason
--
(designed for a fixed-width font!!!)
/**************************************************************************
 * Jason James            CompSci Teacher -+                              *
 *                        RPG Gamer        |- but maybe not in that order *
 * Email:  craie@acm.org  Husband         -+                              *
 **************************************************************************/
Comment 5 Jason James 2003-07-11 14:37:32 UTC
Created attachment 4387 [details]
stl_thread.tar.gz
Comment 6 Andrew Pinski 2003-07-19 19:04:14 UTC
Not gcc's fault but HPUX's as they define PTHREAD_MUTEX_INITIALIZER in posix.h 
and we do not.