From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19925 invoked by alias); 9 Mar 2010 17:11:15 -0000 Received: (qmail 19914 invoked by uid 22791); 9 Mar 2010 17:11:14 -0000 X-SWARE-Spam-Status: No, hits=-10.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: sourceware.org Received: from sj-iport-2.cisco.com (HELO sj-iport-2.cisco.com) (171.71.176.71) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Mar 2010 17:11:09 +0000 Authentication-Results: sj-iport-2.cisco.com; dkim=neutral (message not signed) header.i=none Received: from sj-core-1.cisco.com ([171.71.177.237]) by sj-iport-2.cisco.com with ESMTP; 09 Mar 2010 17:11:08 +0000 Received: from [171.68.115.148] (dhcp-171-68-115-148.cisco.com [171.68.115.148]) by sj-core-1.cisco.com (8.13.8/8.14.3) with ESMTP id o29HB8Y5013388; Tue, 9 Mar 2010 17:11:08 GMT Message-ID: <4B96812C.8030307@cisco.com> Date: Tue, 09 Mar 2010 17:11:00 -0000 From: John Rocha User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Which standard is the default for -std? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00118.txt.bz2 Hello All, I was reading and found the '-std' flag for C++ compilation using the [gcc] compiler. My man page for [gcc] indicates: 1. gnu89 is the default value "Default, ISO C90 plus GNU extension (including some C(features)". 2. gnu99 "ISO C99 plus GNU extension. When IOS C99 is fully implemented in GCC this will become the default." The version of [g++/gcc] I am using is as 4.1.2 20070115 (detailed listing shown at end) for Linux on a SUSE 10 SP1 machine. I went to gnu.org, navigated to the latest documentation for [g++/gcc] and found 4.4.3 20100121. The PDF documentation for 4.4.3 describes the '-std' options the same way: gnu89 is the current default, gnu99 is the planned to be the future default. Is this still true? Is gnu89 still the default, or is this a case where the compiler was updated but the documentation wasn't? [Three years seems a long time to implement a standard -- but I'm being a demanding customer, eh? :)] So, is gnu89 still the default for the '-std' flag? Secondly, is there some flag or option that displays the settings, even the default settings that are in use? I know, RTFM and trust in it, but I've been burned by outdated documentation a few times. Hence my apprehension. Thanks in advance for your time, -=John Detailed listing for my version of g++/gcc. -------------------------------------------------------------------------------- g++ -v Using built-in specs. Target: i586-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix= --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-suse-linux Thread model: posix gcc version 4.1.2 20070115 (prerelease) (SUSE Linux) -------------------------------------------------------------------------------- -- Thought for the day: "2 much txting mks u 1 bad splr!!!!"