This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Wow..


Hello GCC team!

  First of all, excuse me for bad english.
  So, why can't I do this (real code parts):

  ----------------------------- g++ --std=c++14

  unsigned long long a = 0;
  shared_ptr< char* > c = make_shared<>()

  void f( ull* P )
  {
     if( *P == a )          -- seg fault here. if i comment it..
     if( *c != nullptr )    -- seg fault here then.
               cout << "It's ok!\n"; -- never printed!
  }
  
  f( &a );

  ----------------------------- g++ --std=c++14

  Slackware 3.14.18 #2 SMP x86_64
  GCC 4.9.2 x86_64 building code for x86_64, no multilib/multiarch


  Sorry if I bad with this mail, but I just don't know where/how to ask?

Thank You.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]