[aspectc-user] invalid member declaration near token `__asm__'
Guilherme .
guibufolo at gmail.com
Fri Apr 15 16:03:54 CEST 2011
Found a solution myself using __puma preprocessor directive.
On Fri, Apr 15, 2011 at 3:58 PM, Guilherme . <guibufolo at gmail.com> wrote:
> Hi!
>
> I created the bug report. Is there anything i can do to supress this bug?
>
> Regards,
> Guilherme
>
>
> On Fri, Apr 15, 2011 at 3:52 PM, Olaf Spinczyk <os at aspectc.org> wrote:
>
>> Hi!
>>
>> You found a bug. The following code does not compile with ag++ while it
>> works with g++:
>>
>> class c {
>> static int foo __asm__("foo");
>> };
>>
>> 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.
>>
>> We'll fix it if you write a bug report at www.aspectc.org/bugzilla. ;-)
>>
>> - Olaf
>>
>>
>>
>> On 04/15/2011 02:58 PM, Guilherme . wrote:
>>
>>
>> Hi!
>>
>> I'm getting this error but i can't figure out why. One of the macros used
>> in the ecos source expands ultimately to
>>
>> volatile variable_type variable __asm__("label_in_asm_code");
>>
>> but ac++ seems to be having problems with it. Other defines seem to expand
>> properly.
>>
>> Here is the occurence in the code:
>>
>> First file using using a define that expands into __asm__:
>>
>> 256 class Cyg_Scheduler_SchedLock
>> 257 {
>> 258 static volatile cyg_ucount32 sched_lock // lock counter
>> 259 CYGBLD_ATTRIB_ASM_ALIAS( cyg_scheduler_sched_lock
>> )
>> 260 CYGBLD_ANNOTATE_VARIABLE_SCHED
>> 261 ;
>>
>> File with the definitions of the defines:
>>
>> 375 #ifndef CYG_LABEL_DEFN
>> 376
>> 377 #define CYG_LABEL_DEFN(_label) _label
>> 378
>> 379 #endif
>> ...
>> 411 # if !defined(CYGBLD_ATTRIB_ASM_ALIAS)
>> 412 # define __Str(x) #x
>> 413 # define __Xstr(x) __Str(x)
>> 414 # define CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) \
>> 415 __asm__ ( __Xstr( CYG_LABEL_DEFN( __symbol__ ) ) )
>> 416 # endif
>> ...
>> 519 #ifndef CYGBLD_ANNOTATE_VARIABLE_SCHED
>> 520 #define CYGBLD_ANNOTATE_VARIABLE_SCHED
>> 521 #endif
>>
>> Is there anything i can do to further help in the anaylisis?
>>
>> Cheers,
>> Guilherme
>>
>>
>> _______________________________________________
>> aspectc-user mailing listaspectc-user at aspectc.orghttp://www.aspectc.org/mailman/listinfo/aspectc-user
>>
>>
>>
>> _______________________________________________
>> aspectc-user mailing list
>> aspectc-user at aspectc.org
>> http://www.aspectc.org/mailman/listinfo/aspectc-user
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20110415/e991026c/attachment.html>
More information about the aspectc-user
mailing list