<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 18, 2013, at 11:54 , Andy Gibbs <<a href="mailto:andyg1001@hotmail.co.uk">andyg1001@hotmail.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Thursday, April 18, 2013 8:10 PM, Jordan Rose wrote:<br><br><blockquote type="cite">No, that's not correct either. Microsoft's #pragma message requires<br>parens, while #pragma GCC (error|warning) apparently requires no<br>parens. (GCC's #pragma message seems to be MS-inspired, as it has no<br>GCC namespace and optionally allows parens.)<br><a href="http://msdn.microsoft.com/en-us/library/x7dkzch2(v=vs.80).aspx">http://msdn.microsoft.com/en-us/library/x7dkzch2(v=vs.80).aspx</a><br><a href="http://gcc.gnu.org/onlinedocs/cpp/Pragmas.html">http://gcc.gnu.org/onlinedocs/cpp/Pragmas.html</a><br><a href="http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html">http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html</a><br></blockquote><br>I admit I did miss the bit where MS requires the parenthesis (I'm not<br>completely sure this is the case, actually, but I haven't got access to<br>an MS compiler just now to check).<br><br>Regarding #pragma message, I think gcc has made this deprecated since<br>they don't have a #pragma GCC message variant and their documentation<br>states that those not moved forward to the new format are henceforth<br>deprecated.  This is an excerpt from the gcc docs:<br><br>"For backward compatibility, pragmas which were recognized by<br>previous versions are still recognized without the GCC prefix, but<br>that usage is deprecated. Some older pragmas are deprecated in their<br>entirety. They are not recognized with the GCC prefix."<br><br>Also, although this is an aside, clang doesn't support #pragma<br>message in a 100% compatible way since clang technically makes the<br>message a warning, which is not the case either on MS (again this is<br>from memory) or gcc.<br><br><blockquote type="cite">I'm okay with not really striving for source fidelity here; since<br>there's no #pragma GCC message, it's probably safe to just<br>parenthesize message all the time.<br></blockquote><br>So... I'll roll back that particular change, shall I?  I don't think<br>there is much advantage to passing down whether the #pragma was<br>parenthesized or not -- additional overhead for negligible gain IMHO.<br></div></blockquote></div><br><div>The particular change is that "#pragma GCC warning" should not have parentheses, because GCC would choke on that.</div></body></html>