<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’m worrying about use of compound statements as a macro argument. There’s a discussion about this at<div><br></div><div><a href="http://stackoverflow.com/questions/17182877/is-it-ok-to-use-a-code-block-as-an-argument-for-a-c-macro">http://stackoverflow.com/questions/17182877/is-it-ok-to-use-a-code-block-as-an-argument-for-a-c-macro</a></div><div><br></div><div>How serious is the restriction on the use of unguarded commas? E.g., how would multidimensional arrays be expressed? Are there other restrictions?</div><div><br></div><div>-Jim</div><div><br><div><div>On May 14, 2014, at 2:01 AM, Mike Cowlishaw <<a href="mailto:mfc@speleotrove.com">mfc@speleotrove.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><blockquote type="cite"> FE_EXCEPTIONAL( expression or compound statement, <br> exception1, exception2, ...)<br></blockquote><br>Rather than having the multiple arguments, perhaps it could be simply<br><br> FE_EXCEPTIONS( expression )<br><br>which returns the exceptions raised in the evaluation of the expression (or<br>compound statement if that's allowed), ORed together. (Assuming the exceptions<br>& subexpressions are defined to be bit-unique.) <br><br><br>Then one might write:<br><br> if (FE_EXCEPTIONS( p/q | FE_UNDERFLOW )) {whatever}<br><br>or<br><br> x = FE_EXCEPTIONS( a=p/q | FE_UNDERFLOW ) ? a : sNAN ;<br><br>etc.<br><br>Mike<br><br>_______________________________________________<br>Cfp-interest mailing list<br><a href="mailto:Cfp-interest@oakapple.net">Cfp-interest@oakapple.net</a><br>http://mailman.oakapple.net/mailman/listinfo/cfp-interest<br></blockquote></div><br></div></body></html>