platform support decisions

26 views
Skip to first unread message

Bob Carpenter

unread,
Dec 14, 2012, 3:27:44 PM12/14/12
to stan...@googlegroups.com
Here's the story about C++ standards:

C++98: 1998 ISO C++ Standard
C++03: 2003 ISO C++ Technical Corrigendum
C++11: 2011 ISO C++ Standard

I think C++98 is out of date in the sense that C++03 is
the default mode in both g++ and clang++.

I think C++11 is premature in that gtest doesn't support
it yet, nor do Eigen or Boost reliably.

So with the wisdom of Solomon and Goldilocks, I think
we should target C++03 and only C++03 for now.

For the Mac, I think we can safely restrict ourselves to the
latest Xcode versions of g++ and clang++ with their own default
libs:

Xcode 4.5.2 g++ 4.2.1, {O=0, O=3}, C++03
Xcode 4.5.2 clang++ 3.1, {O=0, O=3}, C++03

All four of these tests with the current repository version.

I added a new section at the top of the TestUnitStats listing
"supported" platforms. The idea of "support" is that we won't
release unless all tests pass on these platforms.

I added this as the list of "supported" platforms on the Wiki for
the Mac.

Could someone do the same for Windows and Linux and make sure
the current tests pass?

If we can do this, I think we should roll out Stan 1.0.4 this weekend
or early next week.

- Bob

Ben Goodrich

unread,
Dec 14, 2012, 3:37:22 PM12/14/12
to stan...@googlegroups.com
On Friday, December 14, 2012 3:27:44 PM UTC-5, Bob Carpenter wrote:
Here's the story about C++ standards:

    C++98:  1998 ISO C++ Standard
    C++03:  2003 ISO C++ Technical Corrigendum
    C++11:  2011 ISO C++ Standard

I think C++98 is out of date in the sense that C++03 is
the default mode in both g++ and clang++.

Almost, see

http://gcc.gnu.org/onlinedocs/gcc/Standards.html

under the C++ section. "The default, if no C++ language dialect options are given, is -std=gnu++98." so we would need to specify -std=c++03 explicitly, which is probably a good idea.

Ben

Ben Goodrich

unread,
Dec 14, 2012, 3:47:42 PM12/14/12
to stan...@googlegroups.com
On Friday, December 14, 2012 3:27:44 PM UTC-5, Bob Carpenter wrote:
For the Mac, I think we can safely restrict ourselves to the
latest Xcode versions of g++ and clang++ with their own default
libs:

    Xcode 4.5.2 g++ 4.2.1, {O=0, O=3}, C++03
    Xcode 4.5.2 clang++ 3.1, {O=0, O=3}, C++03

All four of these tests with the current repository version.

I think we should clarify that g++ 4.2.1 on Xcode is really llvm-g++ 4.2.1. Pure g++ is generally fine on Linux, so it is presumably OK on Mac. But aside from Daniel maybe testing with pure g++ 4.6, I don't think we know much about pure g++ on a Mac (not that the average user would be downloading it).

Ben

Daniel Lee

unread,
Dec 14, 2012, 3:59:21 PM12/14/12
to stan...@googlegroups.com
I'm testing with a MacPorts distributed g++:
gcc version 4.6.3 (MacPorts gcc46 4.6.3_4) 




--
 
 

Ben Goodrich

unread,
Dec 14, 2012, 4:00:51 PM12/14/12
to stan...@googlegroups.com

There is also the -pedantic thing. Last I checked, if you enabled that, test-unit was passing but with more warnings about things that g++ permits but are not part of the 98 standard. Those may have become incorporated into the 0x standard, I don't know.

Ben


Bob Carpenter

unread,
Dec 14, 2012, 4:04:48 PM12/14/12
to stan...@googlegroups.com
Their doc at

http://gcc.gnu.org/projects/cxx0x.html

says that support for C++11 is still "experimental".


But it turns out Ben is right that c++98 is the default for
g++ 4.2.1 on the Mac. I don't know which version Daniel showed
me where c++03 was the default -- maybe it's a later g++.

This is just madness!

- Bob



Daniel Lee

unread,
Dec 14, 2012, 4:06:01 PM12/14/12
to stan...@googlegroups.com
Bob has a better memory than I do: The conflicting default for the std option comes from:
and it says 
`gnu++03'  GNU dialect of -std=c++98. This is the default for C++ code. 
 
Reply all
Reply to author
Forward
0 new messages