вопрос о солярисе с developerstudio 12.6 - PullRequest
0 голосов
/ 01 февраля 2019

Рассмотрим приведенный ниже код, который показывает проблему.

test.C

#include <stdio.h>
int func2(int x);

// inline the func1. 
inline int func1(int y)
{
     {
      return func2(y);
     }
  return 1;
}

int func2(int x)
{
   return 0;
}

int main(void)
{
  if (func1(99))
      printf("This should never print\n");
  return 0;
}

/ opt / developerstudio12.6 / bin / CC -o test -m64 -xarch = sparc -O -xmaxopt + w2 -std = c ++ 11 test.C

Это печатает "Это никогда не должно печататься" в моей системе.

...