{"id":1528,"date":"2024-03-21T13:29:44","date_gmt":"2024-03-21T13:29:44","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1528"},"modified":"2024-03-21T13:30:14","modified_gmt":"2024-03-21T13:30:14","slug":"error-macro-expands-to-multiple-statements","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/compilers\/gcc-compiler\/errors\/error-macro-expands-to-multiple-statements","title":{"rendered":"error: macro expands to multiple statements"},"content":{"rendered":"\n<p>An example of what will cause it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#define DISPLAY_COMMS_RESET_RX()\tDisplayCommsRxResponsesReceived = 0; DisplayCommsRxResponseByte = 0; DisplayCommsResponsesChecked = 0<\/code><\/pre>\n\n\n\n<p>Ideally you&#8217;d call a function instead, but there is a recommended workaround:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#define DISPLAY_COMMS_RESET_RX()\tdo {DisplayCommsRxResponsesReceived = 0; DisplayCommsRxResponseByte = 0; DisplayCommsResponsesChecked = 0;} while (0)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>An example of what will cause it: Ideally you&#8217;d call a function instead, but there is a recommended workaround:<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[],"class_list":["post-1528","post","type-post","status-publish","format-standard","hentry","category-errors"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/comments?post=1528"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1528\/revisions"}],"predecessor-version":[{"id":1530,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1528\/revisions\/1530"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}