<!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 text="#000000" bgcolor="#ffffff">
Hi!<br>
<br>
You found a bug. The following code does not compile with ag++ while it
works with g++:<br>
<br>
class c {<br>
static int foo __asm__("foo");<br>
};<br>
<br>
These "asm labels" are a gnu-compiler specific extension. They are
implemented by the ac++ parser for global and local variables, but the
case of static class members is missing. It probably happened, because
the gcc/g++ documentation does not mention asm labels for static class
members.<br>
<br>
We'll fix it if you write a bug report at <a class="moz-txt-link-abbreviated" href="http://www.aspectc.org/bugzilla">www.aspectc.org/bugzilla</a>. ;-)<br>
<br>
- Olaf<br>
<br>
<br>
On 04/15/2011 02:58 PM, Guilherme . wrote:
<blockquote
cite="mid:BANLkTikL3MBp2mPY6459HW+hVt8O9=nugg@mail.gmail.com"
type="cite"><br>
Hi!<br>
<br>
I'm getting this error but i can't figure out why. One of the macros
used in the ecos source expands ultimately to<br>
<br>
volatile variable_type variable __asm__("label_in_asm_code");<br>
<br>
but ac++ seems to be having problems with it. Other defines seem to
expand properly.<br>
<br>
Here is the occurence in the code:<br>
<br>
First file using using a define that expands into __asm__:<br
style="font-family: courier new,monospace;">
<br>
256 class Cyg_Scheduler_SchedLock<br>
257 {<br>
258 static volatile cyg_ucount32 sched_lock // lock counter<br>
259 CYGBLD_ATTRIB_ASM_ALIAS(
cyg_scheduler_sched_lock )<br>
260 CYGBLD_ANNOTATE_VARIABLE_SCHED<br>
261 ;<br>
<br>
File with the definitions of the defines:<br>
<br>
<span style="font-family: courier new,monospace;">375 #ifndef
CYG_LABEL_DEFN</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">376 </span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">377 #define
CYG_LABEL_DEFN(_label) _label</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">378 <br>
</span><span style="font-family: courier new,monospace;">379 #endif<br>
</span><span style="font-family: courier new,monospace;">...
</span><span style="font-family: courier new,monospace;"></span><br>
<span style="font-family: courier new,monospace;"></span><span
style="font-family: courier new,monospace;">411 # if
!defined(CYGBLD_ATTRIB_ASM_ALIAS)</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">412 # define
__Str(x) #x</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">413 # define
__Xstr(x) __Str(x)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">414 # define
CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) \</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">415
__asm__ ( __Xstr( CYG_LABEL_DEFN( __symbol__ ) ) )</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">416 # endif</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">...<br>
519 #ifndef CYGBLD_ANNOTATE_VARIABLE_SCHED<br>
520 #define CYGBLD_ANNOTATE_VARIABLE_SCHED<br>
521 #endif<br>
</span><span style="font-family: courier new,monospace;"></span><br>
Is there anything i can do to further help in the anaylisis?<br>
<br>
Cheers,<br>
Guilherme<span style="font-family: courier new,monospace;"></span><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
aspectc-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aspectc-user@aspectc.org">aspectc-user@aspectc.org</a>
<a class="moz-txt-link-freetext" href="http://www.aspectc.org/mailman/listinfo/aspectc-user">http://www.aspectc.org/mailman/listinfo/aspectc-user</a>
</pre>
</blockquote>
<br>
</body>
</html>