{"id":118,"date":"2016-07-03T19:45:00","date_gmt":"2016-07-03T17:45:00","guid":{"rendered":"http:\/\/www.ncodenicer.com\/?p=118"},"modified":"2026-05-10T22:13:26","modified_gmt":"2026-05-10T20:13:26","slug":"how-to-find-out-which-preprocessor-symbols-are-defined-for-c-c-compiler","status":"publish","type":"post","link":"https:\/\/www.codenicer.com\/?p=118","title":{"rendered":"How to find out which preprocessor symbols are defined for C\/C++ compiler"},"content":{"rendered":"\n<p>Run compiler with arguments <code>-dM -E -xc++ \/dev\/null<\/code>. (<code>-x<\/code> specifies language, so if you want to see predefined symbols for C, you should use <code>-xc<\/code> instead of <code>-xc++<\/code>).<\/p>\n\n\n\n<p>For example:<code><br>clang -dM -E -xc++ \/dev\/null<\/code><br>or<code><br>gcc -dM -E -xc++ \/dev\/null<\/code><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Run compiler with arguments -dM -E -xc++ \/dev\/null. (-x specifies language, so if you want to see predefined symbols for C, you should use -xc instead of -xc++). For example:clang -dM -E -xc++ \/dev\/nullorgcc -dM -E -xc++ \/dev\/null<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[63,6,81],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-clang","tag-freebsd","tag-gcc"],"_links":{"self":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=118"}],"version-history":[{"count":1,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":119,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions\/119"}],"wp:attachment":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}