Opened 20 years ago

Closed 15 years ago

#75 closed Bugs (wontfix)

Solaris - once.cpp compile error

Reported by: cpqlvc Owned by: Marshall Clow
Milestone: Component: None
Version: None Severity: Showstopper
Keywords: Cc:

Description

I tried to compile the Boost.Threads library on
Solaris, but once.cpp generated a compile error.
The Solaris system is 

(export/home/swansond)$ uname -a
SunOS lvcsun1 5.8 Generic_108528-13 sun4u sparc 
SUNW,Ultra-4

The compiler is 

(export/home/swansond)$ g++ -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-
solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

The compile error is 
(27_0/libs/thread/src)$ g++ -g -Wall -
o ../build/lib/once.o -c -I../../.. once.cpp
once.cpp:42: warning: aggregate has a partly bracketed 
initializer
once.cpp:138: parse error at end of input

To eliminate the warning I enclosed PTHREAD_ONCE_INIT
in curly braces.

To correct the error (maybe ?) I added a closing
brace after the definition of do_once().

Change History (3)

comment:1 by cpqlvc, 20 years ago

Logged In: YES 
user_id=525108

I tried compiling Boost.Threads on an RS/6000 box running 
AIX 4.3.  Of course, the curly brace problem reoccurred, 
which I fixed (?) as above, and on this platform I got a 
different warning about PTHREAD_ONCE_INIT.  

(27_0/libs/thread/src)$ g++ -g -Wall -W -I../../.. -c 
once.cpp
once.cpp:42: warning: missing initializer for member 
`pthread_once_t::__ptonce_mutex'
once.cpp:42: warning: missing initializer for member 
`pthread_once_t::__ptonce_executed'
(27_0/libs/thread/src)$ 


comment:2 by Marshall Clow, 15 years ago

Owner: changed from mclow to Marshall Clow
Severity: Showstopper
Status: assignednew

comment:3 by Marshall Clow, 15 years ago

Resolution: Nonewontfix
Status: newclosed

This is a really, really old compiler. [ based on gcc 2.95.2 ], and the bug was reported in 2002. I don't think anyone uses this compiler (with boost) anymore. The last two people who posted to the boost list with questions about Solaris don't use this compiler (it's too old).

Closing.

Note: See TracTickets for help on using tickets.