Re: [Boost-bugs] [Boost C++ Libraries] #9379: 'boost::chrono::steady_clock' has not been declared" on boost 1.55, hp-ux 11.23 IA, gcc 4.6

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9379: 'boost::chrono::steady_clock' has not been declared" on boost 1.55, hp-ux 11.23 IA, gcc 4.6
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-26 09:47:14


#9379: 'boost::chrono::steady_clock' has not been declared" on boost 1.55, hp-ux
11.23 IA, gcc 4.6
-------------------------------+--------------------------
  Reporter: gengyonghui@… | Owner: viboes
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: chrono
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords: steady_clock
-------------------------------+--------------------------

Comment (by 20313412@…):

 Hi Viboes, checked HP-UX with following code:
 {{{
 #include </usr/include/time.h>
 int main()
 {

   #ifdef _POSIX_SOURCE
     long long a = 0;
     a += 1;

     hrtime_t begin ;
     begin = gethrtime();
   #endif
   return 0;

 }
 }}}

 both following cmd line successed
 {{{
 cc -g -Ae -o b b.c

 cc -g -Aa -o b b.c
 }}}


 with following code
 {{{
 #include </usr/include/time.h>
 int main()
 {
     long long a = 0;
     a += 1;

     hrtime_t begin ;
     begin = gethrtime();
   return 0;

 }

 }}}
 failed to compile with
 {{{ cc -g -Aa -o b b.c}}}
 err msg:
 {{{
 "b.c", line 4: warning #2450-D: the type "long long" is nonstandard
       long long a = 0;
            ^
 "b.c", line 7: error #2268: declaration may not appear after executable
           statement in block
       hrtime_t begin ;
       ^
 "b.c", line 7: error #2020: identifier "hrtime_t" is undefined
       hrtime_t begin ;
       ^
 2 errors detected in the compilation of "b.c".
 }}}

 but successed with {{{ cc -g -Ae -o b b.c}}}

 so , I think:
 1. BOOST_NO_LONG_LONG indicates no -Ae option used in cmd line
 2. _POSIX_SOURCE indicates -Ae model too
 3. since {{{In HP-UX 10.20 and earlier releases, compatibility mode is the
 default
 compilation mode. In HP-UX 10.30 forward, extended ANSI mode (-Ae)
 is the default}}}, maybe it's not necessary to check -Ae model?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9379#comment:26>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC