{"id":4895,"date":"2014-03-30T16:31:58","date_gmt":"2014-03-30T16:31:58","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/overloading-free-so-my-program-use-mine-instead-of-the-systems-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:31:58","modified_gmt":"2014-03-30T16:31:58","slug":"overloading-free-so-my-program-use-mine-instead-of-the-systems-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/overloading-free-so-my-program-use-mine-instead-of-the-systems-collection-of-common-programming-errors\/","title":{"rendered":"Overloading free() so my program use mine instead of the system&#39;s-Collection of common programming errors"},"content":{"rendered":"<p>If you are looking for a standard way, I&#8217;m afraid it doesn&#8217;t exist. Redefining standard library names is undefined behavior.<\/p>\n<p>C11, 7.1.3.2:<\/p>\n<blockquote>\n<p>&#8230; If the program declares or defines an identifier in a context in which it is reserved (other than as allowed by 7.1.4), or defines a reserved identifier as a macro name, the behavior is undefined.<\/p>\n<\/blockquote>\n<p>In 7.1.4, there are is a long explanation of how the library may define a macro <em>with the same name as the function<\/em> and how to bypass that macro. There is no indication of how a user may override a standard library function.<\/p>\n<p>You can also see this question for more information.<\/p>\n<p>Non standard ways are of course always possible as you can find in other answers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking for a standard way, I&#8217;m afraid it doesn&#8217;t exist. Redefining standard library names is undefined behavior. C11, 7.1.3.2: &#8230; If the program declares or defines an identifier in a context in which it is reserved (other than as allowed by 7.1.4), or defines a reserved identifier as a macro name, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4895","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4895"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4895\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}