{"id":92,"date":"2007-03-07T12:46:00","date_gmt":"2007-03-07T10:46:00","guid":{"rendered":"http:\/\/www.thelins.se\/johan\/blog\/2007\/03\/gcc-gems\/"},"modified":"2007-03-07T12:46:00","modified_gmt":"2007-03-07T10:46:00","slug":"gcc-gems","status":"publish","type":"post","link":"https:\/\/www.thelins.se\/johan\/blog\/2007\/03\/gcc-gems\/","title":{"rendered":">GCC gems"},"content":{"rendered":"<p>>Everybody using GCC on a daily basis must have run into one of its hidden gems. Error messages that could be poetry, in a foreign language, written backwards. The message tells you pretty much &#8211; nothing. When you have found the problem and fixed you still wonder what GCC really meant and why it could not tell you something in English&#8230;<\/p>\n<p>One of my personal favourites was when I was using C and wrote:<\/p>\n<p><tt>typedef struct { ... } Foo;<\/p>\n<p>void function()<br \/>{<br \/>struct Foo foo;<\/p>\n<p>...<br \/>}<\/tt><\/p>\n<p>Did you spot the mistake? GCC did &#8211; and told me this:<\/p>\n<p><tt>storage size of 'foo' isn't known<\/tt><\/p>\n<p>After <i>much<\/i> work I found that Foo wasn&#8217;t a struct, but a typedefed struct. Just skipping the word <tt>struct<\/tt> in the declaration of foo solved it.<\/p>\n<p>What are your favorites? Comment!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>>Everybody using GCC on a daily basis must have run into one of its hidden gems. Error messages that could be poetry, in a foreign language, written backwards. The message tells you pretty much &#8211; nothing. When you have found the problem and fixed you still wonder what GCC really meant and why it could &hellip; <a href=\"https:\/\/www.thelins.se\/johan\/blog\/2007\/03\/gcc-gems\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">>GCC gems<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":0,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}