<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Warnung an einer einzigen Stelle ignorieren.]]></title><description><![CDATA[<p>Hallo, ich möchte die Warnung</p>
<p>warning: comparison between signed and unsigned integer expressions</p>
<p>an einer einzigen Stelle im Code ausschalten (geht leider nicht anders).</p>
<p>Es soll ja mit</p>
<pre><code>#pragma warning( push )
#pragma warning( disable : WarningCode)
// code with warning
#pragma warning( pop )
</code></pre>
<p>Aber ich weiß nicht welche Nummer für diese Warnung es genau ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/332519/warnung-an-einer-einzigen-stelle-ignorieren</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 00:55:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/332519.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 May 2015 14:50:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 14:50:50 GMT]]></title><description><![CDATA[<p>Hallo, ich möchte die Warnung</p>
<p>warning: comparison between signed and unsigned integer expressions</p>
<p>an einer einzigen Stelle im Code ausschalten (geht leider nicht anders).</p>
<p>Es soll ja mit</p>
<pre><code>#pragma warning( push )
#pragma warning( disable : WarningCode)
// code with warning
#pragma warning( pop )
</code></pre>
<p>Aber ich weiß nicht welche Nummer für diese Warnung es genau ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452708</guid><dc:creator><![CDATA[Namal]]></dc:creator><pubDate>Wed, 06 May 2015 14:50:50 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 14:56:08 GMT]]></title><description><![CDATA[<p>Oder du castest einfach beide in einen Typen, der den Wertebereich beider fassen kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452709</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Wed, 06 May 2015 14:56:08 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 15:00:38 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Oder du castest einfach beide in einen Typen, der den Wertebereich beider fassen kann.</p>
</blockquote>
<p>Kostet es nicht zuviel wenn ich es mehrere Millionen mal machen muss?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452710</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452710</guid><dc:creator><![CDATA[Namal]]></dc:creator><pubDate>Wed, 06 May 2015 15:00:38 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 15:04:14 GMT]]></title><description><![CDATA[<p>Namal schrieb:</p>
<blockquote>
<p>Aber ich weiß nicht welche Nummer für diese Warnung es genau ist.</p>
</blockquote>
<p>Steht doch in der Warning, die du abschalten willst!?<br />
Oder verstehe ich was falsch?</p>
<p>Edit:<br />
4389 beim msvc</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452711</guid><dc:creator><![CDATA[Jockelx]]></dc:creator><pubDate>Wed, 06 May 2015 15:04:14 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 15:10:29 GMT]]></title><description><![CDATA[<p>Hab den gcc, steht leider nur die Zeile und die oben genannte Warnung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452712</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452712</guid><dc:creator><![CDATA[Namal]]></dc:creator><pubDate>Wed, 06 May 2015 15:10:29 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 15:12:30 GMT]]></title><description><![CDATA[<p>Namal schrieb:</p>
<blockquote>
<p>Nathan schrieb:</p>
<blockquote>
<p>Oder du castest einfach beide in einen Typen, der den Wertebereich beider fassen kann.</p>
</blockquote>
<p>Kostet es nicht zuviel wenn ich es mehrere Millionen mal machen muss?</p>
</blockquote>
<p>Nein, es wird sowieso gecastet (in den unsigned Typen). Ausserdem sind signed/unsigned gratis, da die Typen auf Assembler-Ebene gar nicht existieren.</p>
<p>Caste explizit und lass das mit den Compiler-Pragmas bleiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452714</guid><dc:creator><![CDATA[kostlo]]></dc:creator><pubDate>Wed, 06 May 2015 15:12:30 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 15:16:53 GMT]]></title><description><![CDATA[<p>Namal schrieb:</p>
<blockquote>
<p>Hab den gcc, steht leider nur die Zeile und die oben genannte Warnung.</p>
</blockquote>
<p>Dieses '#pragma warning( disable : WarningCode)' geht eh nur mit msvc (soweit ich weiss, keine Ahnung von gcc).<br />
Aber wie bereits gesagt ist das Warning-Abschalten in deinem Fall eh unnötig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2452716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452716</guid><dc:creator><![CDATA[Jockelx]]></dc:creator><pubDate>Wed, 06 May 2015 15:16:53 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung an einer einzigen Stelle ignorieren. on Wed, 06 May 2015 15:28:11 GMT]]></title><description><![CDATA[<p>Namal schrieb:</p>
<blockquote>
<p>Hab den gcc, steht leider nur die Zeile und die oben genannte Warnung.</p>
</blockquote>
<p>Dieses pragma Gedöns ist abhängig vom Compiler.</p>
<p><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html" rel="nofollow">warning options</a><br />
<a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html" rel="nofollow">diagnostic pragmas</a><br />
<a href="https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros" rel="nofollow">predefined macros</a></p>
<pre><code class="language-cpp">#ifdef __GNUG__
#pragma GCC diagnostic ignored &quot;-Wsign-compare&quot;
#endif 
  // code with warning
#ifdef __GNUG__
#pragma GCC diagnostic pop
#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2452717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2452717</guid><dc:creator><![CDATA[Furble Wurble]]></dc:creator><pubDate>Wed, 06 May 2015 15:28:11 GMT</pubDate></item></channel></rss>