<?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[Fehler seit Update von GCC]]></title><description><![CDATA[<p>Hi,</p>
<p>ich verwende jetzt MinGW (gcc version 4.5.2). Ich bin mir nicht ganz sicher was ich vorher hatte. Irgendwas neueres aus der 3. Reihe glaub ich.</p>
<p>Jedenfalls wollen viele meiner Sachen nicht mehr kompilieren. Jetzt bekomme ich immer den Fehler &quot;note: synthesized method '...' first required here&quot;.</p>
<p>Eine meiner Dateien hab ich mal auf das Minimum runtergestutzt und frage mich jetzt wieso das früher problemlos funktioniert hat und jetzt nicht mehr.</p>
<pre><code class="language-cpp">#include &lt;string&gt;

typedef struct _Type {
    std::string str;
} TYPE;

int main(void)
{
    TYPE var;
}
</code></pre>
<pre><code>3:22: warning: '_Type::str' should be initialized in the member initialization list
9:10: note: synthesized method '_Type::_Type()' first required here
</code></pre>
<p>Caster</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/290239/fehler-seit-update-von-gcc</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 16:07:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/290239.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Jul 2011 23:42:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler seit Update von GCC on Thu, 21 Jul 2011 23:42:56 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich verwende jetzt MinGW (gcc version 4.5.2). Ich bin mir nicht ganz sicher was ich vorher hatte. Irgendwas neueres aus der 3. Reihe glaub ich.</p>
<p>Jedenfalls wollen viele meiner Sachen nicht mehr kompilieren. Jetzt bekomme ich immer den Fehler &quot;note: synthesized method '...' first required here&quot;.</p>
<p>Eine meiner Dateien hab ich mal auf das Minimum runtergestutzt und frage mich jetzt wieso das früher problemlos funktioniert hat und jetzt nicht mehr.</p>
<pre><code class="language-cpp">#include &lt;string&gt;

typedef struct _Type {
    std::string str;
} TYPE;

int main(void)
{
    TYPE var;
}
</code></pre>
<pre><code>3:22: warning: '_Type::str' should be initialized in the member initialization list
9:10: note: synthesized method '_Type::_Type()' first required here
</code></pre>
<p>Caster</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096313</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096313</guid><dc:creator><![CDATA[Caster]]></dc:creator><pubDate>Thu, 21 Jul 2011 23:42:56 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 00:28:05 GMT]]></title><description><![CDATA[<p>Öh. Ich sehe keinen Fehler. Bloss eine Warning + Zusatzinfo. Was gemeint ist ist auch klar, auch wenn ich nicht verstehe wie jmd. auf die Idee kommen könnte in so einer Situation eine Warning auszugeben. Aber naja.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096321</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Fri, 22 Jul 2011 00:28:05 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 01:08:17 GMT]]></title><description><![CDATA[<p>Lösung: niemals mit -Weffc++ kompilieren. -Wall und -Wextra reichen völlig.</p>
<p>Edit: wenn ich mein aktuell geöffnetes Projekt mit -Weffc++ kompiliere, bekomme ich gleich 2373 Warnungen, obwohl es noch nicht besonders groß ist. Na Prost <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Außerdem scheint Code::Blocks ein Problem mit &quot;note: &quot; zu haben und interpretiert das als Compilerfehler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096328</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096328</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Fri, 22 Jul 2011 01:08:17 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 01:18:21 GMT]]></title><description><![CDATA[<p>-Weffc++ gibt es schon ewig, selbst gcc 3.3.6 spuckt</p>
<blockquote>
<p>test.cpp: In constructor <code>\_Type::\_Type()': test.cpp:9: warning:</code>_Type::str' should be initialized in the member<br />
initialization list</p>
</blockquote>
<p>aus. Leider wird nicht auf den tatsächlich vorhandenen Fehler (Verwendung eines reservierten Bezeichners) trotz -pedantic und -ansi hingewiesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096329</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Fri, 22 Jul 2011 01:18:21 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 06:05:24 GMT]]></title><description><![CDATA[<p>Vielleicht bringt das vollkommen sinnlose typedef den Compiler aus dem Tritt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096333</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096333</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Fri, 22 Jul 2011 06:05:24 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 07:33:15 GMT]]></title><description><![CDATA[<p>manni66 schrieb:</p>
<blockquote>
<p>Vielleicht bringt das vollkommen sinnlose typedef den Compiler aus dem Tritt?</p>
</blockquote>
<p>Wäre ein schlechter Compiler, wenn es das täte. Das sinnlose typedef ist C-Style...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096350</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096350</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 22 Jul 2011 07:33:15 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 08:21:43 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>manni66 schrieb:</p>
<blockquote>
<p>Vielleicht bringt das vollkommen sinnlose typedef den Compiler aus dem Tritt?</p>
</blockquote>
<p>Wäre ein schlechter Compiler, wenn es das täte. Das sinnlose typedef ist C-Style...</p>
</blockquote>
<p>Naja, du nimmst hoffentlich nicht an, dass der GNU-Compiler fehlerfrei ist. Gerade weil es alter C-Style aber eben mit std::string ist, hat es vielleicht niemand getestet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096365</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096365</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Fri, 22 Jul 2011 08:21:43 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 09:43:32 GMT]]></title><description><![CDATA[<p>manni66 schrieb:</p>
<blockquote>
<p>Naja, du nimmst hoffentlich nicht an, dass der GNU-Compiler fehlerfrei ist. Gerade weil es alter C-Style aber eben mit std::string ist, hat es vielleicht niemand getestet.</p>
</blockquote>
<p>Ich nehme nicht an, dass der Compiler fehlerfrei ist. Vielmehr gehe ich aber davon aus, dass so ein doch relativ häufig benutztes Konstrukt wie das typedef nicht mit der Generierung des Defaultkonstruktors interferiert, das wäre schon ziemlich tragisch. Und die Warnung kommt nunmal aus dem generierten Ctor und sieht das typedef überhaupt nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096403</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 22 Jul 2011 09:43:32 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 10:52:54 GMT]]></title><description><![CDATA[<p>Athar schrieb:</p>
<blockquote>
<p>Außerdem scheint Code::Blocks ein Problem mit &quot;note: &quot; zu haben und interpretiert das als Compilerfehler.</p>
</blockquote>
<p>OK, das ist das Problem. Ich verwende Code::Blocks und ich hab mich gefragt wieso die &quot;note&quot; als fehler gewertet wird. Ich hab mich nur gewundert, wieso bei meinen Projekten aufeinmal so viel rot (kompilierfehler) ist.</p>
<p>Danke für die Antworten.</p>
<p>Weiß jemand was die note genau zu bedeuten hat? Die Warnung ist ja klar, aber die note sagt mir gar nichts.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096436</guid><dc:creator><![CDATA[Caster]]></dc:creator><pubDate>Fri, 22 Jul 2011 10:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 11:01:45 GMT]]></title><description><![CDATA[<p>Caster schrieb:</p>
<blockquote>
<p>Athar schrieb:</p>
<blockquote>
<p>Außerdem scheint Code::Blocks ein Problem mit &quot;note: &quot; zu haben und interpretiert das als Compilerfehler.</p>
</blockquote>
<p>OK, das ist das Problem. Ich verwende Code::Blocks und ich hab mich gefragt wieso die &quot;note&quot; als fehler gewertet wird.</p>
</blockquote>
<p>Echt? Bei<br />
Compiler/Global Compiler Settings/Advanced Options/Compiler Note<br />
steht bei mir als Maske</p>
<pre><code>([][{}() \t#%$~A-Za-z0-9_:+/\.-]+):([0-9]+):[ \t]([Nn]ote:[ \t].*)
</code></pre>
<p>und als Typ &quot;Info&quot;.<br />
Und die note:-Zeile aus diesem Thread analysiert er auch richtig und erkennt sie als Info.<br />
Und mein Code::Blocks unter Windows ist 14 Monate alt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096437</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096437</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Fri, 22 Jul 2011 11:01:45 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 12:29:38 GMT]]></title><description><![CDATA[<p>Caster schrieb:</p>
<blockquote>
<p>Weiß jemand was die note genau zu bedeuten hat? Die Warnung ist ja klar, aber die note sagt mir gar nichts.</p>
</blockquote>
<p>Das is nur ne Info, wo die impliziert definierte Funktion (hier der Default-Ctor) zum ersten mal gebraucht wurde.<br />
Weil die implizit definierten Funktionen erst erstellt werden, wenn sie gebraucht werden.</p>
<p>Angenommen der Default-Ctor kann nicht implizit definiert werden, und angenommen das soll auch so sein (Klasse ist halt nicht kopierbar). Dann reicht mir die Info &quot;Default-Ctor kann nicht implizit definiert werden&quot; nicht. Irgendwo im Programm versucht jmd. den Default-Ctor zu verwenden, und diese Stellen muss ich finden. Wenn ich die mit Hand suchen muss, wäre das lästig. Also der Hinweis vom Compiler, welches Stück Code den Versuch getriggert hat den Default-Ctor zu erstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096491</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Fri, 22 Jul 2011 12:29:38 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 13:41:16 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/13960">@hustbaer</a>: Danke für die Erklärung.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/106">@volkard</a>: Ja die Zeile steht bei mir auch drin und wenn ich die zeile zum testen eingebe wird die auch erkannt. Ich weiß nicht was da dann nicht passt.<br />
Vielleicht ist da in meinen configs was durcheinander geraten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096527</guid><dc:creator><![CDATA[Caster]]></dc:creator><pubDate>Fri, 22 Jul 2011 13:41:16 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler seit Update von GCC on Fri, 22 Jul 2011 14:34:35 GMT]]></title><description><![CDATA[<p>Wenn man die Nachricht alleine eingibt, dann passt es.<br />
Die vollständige Zeile passt aber nicht mehr, z.B.:<br />
<code>main.cpp:11:10: note: synthesized method ‘_Type::_Type()’ first required here</code></p>
<p>Das dürfte daran liegen, dass sie vorher von der &quot;Preprocessor error&quot;-Regexp als Fehler eingestuft wird:<br />
([][{}() \t#%$~A-Za-z0-9_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)</p>
<p>Wenn man die Reihenfolge tauscht, geht es wieder.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096556</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096556</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Fri, 22 Jul 2011 14:34:35 GMT</pubDate></item></channel></rss>