<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 03/07/2011 12:11 PM, Erez D wrote:
<blockquote
cite="mid:AANLkTi=CPtczf5=TKxgS8VxHQmD-3WOmG+kAjAk8TCLJ@mail.gmail.com"
type="cite">
<div dir="ltr">I have a function which is not called in a regular
way, so gcc thinks it is dead code.<br>
however it is not, and i am looking for a way to tell the linker
not to remove it.<br>
<br>
i can call it from some place with a flag that tells it to do
nothing, but this is a ugly hack <br>
is there a directive telling gcc not to remove that certain
function ?<br>
<br>
</div>
</blockquote>
I did not exactly try, but if there is -fdce, which is by default
enabled an -O*, there should be also -fno-dce and fno-tree-dce, is
it not?<br>
<br>
<blockquote
cite="mid:AANLkTi=CPtczf5=TKxgS8VxHQmD-3WOmG+kAjAk8TCLJ@mail.gmail.com"
type="cite">
<div dir="ltr">thanks,<br>
erez.<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Linux-il mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a>
<a class="moz-txt-link-freetext" href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a>
</pre>
</blockquote>
<br>
</body>
</html>