LoginSignup
0
0

More than 5 years have passed since last update.

C > warning: C++ style comments are incompatible with C90 | workdt.tm_isdst = -1; // summer time flag

Last updated at Posted at 2017-08-02

関連
http://qiita.com/7of9/items/1965c5e8d9e839652808#comment-f4d36d428c9911308cb2

上記で掲示いただいたideone上のCコードで以下の警告が出ている。

prog.c: In function ‘getElapsedSecond’:
prog.c:112:27: warning: C++ style comments are incompatible with C90
     workdt.tm_isdst = -1; // summer time flag

//というコメント記載はC99からの対応のようだ。

// comments are not allowed in old (pre 99) C versions, use /**/ (or remove the -ansi, that is a synonym for the C89 standard)

自分が使っている組込みの開発環境を見直すと、C dialectにC89とC99がある。現在C99を使っているため、上記の警告は出ていなかったようだ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0