LoginSignup
0
1

More than 5 years have passed since last update.

#defineされた値の確認 > #if DBG_MINIMIZE == 0

Last updated at Posted at 2015-04-09

動作環境

Xilinx XSDK v2014.4

Cのコードにおいて#defineされた値を確認するため、以下のコードを用いた

#if DBG_MINIMIZE == 1
#error "dbg:is 1"
#else
#error "dbg:not 1"
#endif

もしDBG_MINIMIZEが1としてdefineされていたら"dbg:is 1"の所でエラーとなる。
1以外の値だったら、"dbg:not 1"の所でエラーとなる。

#errorでなく#messageのようなものがあったかと思うが、失念したので割愛。

0
1
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
1