qemacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-devel] [PATCH] attribute "used"


From: Flavien Lebarbe
Subject: [Qemacs-devel] [PATCH] attribute "used"
Date: Fri, 13 May 2005 00:09:37 +0200
User-agent: Mutt/1.4.1i

Hi,


I'm using qemacs on linux Fedora Core 3. Compiler is gcc 3.4.3.

Without the attached patch, qemacs compiles cleanly,  but  all  I
get is: "No suitable display found, exiting"

The reason is that the functions  defined  with  qe_module_init()
are never called. I found out I  need  to  add  "used"  attribute
here.

Pasting from the info of gcc 3.4.3 :
`used'
     This attribute, attached to a function, means that code must
     be emitted for the function even  if  it  appears  that  the
     function is not referenced. This  is  useful,  for  example,
     when the function is referenced only in inline assembly.

Given this, I'd say we need both "used" and "unused" !!!

Attached is a patch that implements this. I'm not sure if this is
the right fix or not. It  just  passes  the  "it  works  for  me"
test with gcc 3.4.3. It also compiles cleanly  with  egcs-2.91.66
(although I had to disable x11 support because of missing libs).


Flavien.

Attachment: qemacs-attribute-used.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]