[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some #define .... in C not recognised as definition
From: |
Leo Liu |
Subject: |
Re: Some #define .... in C not recognised as definition |
Date: |
Mon, 24 Feb 2014 19:08:34 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) |
On 2014-02-24 17:35 +0800, Shigio YAMAGUCHI wrote:
> The cause of the problem is the line 299.
>
> 299: _ET_DECLARE_CHECKED(Uint,header_arity,Eterm)
>
> The C parser in GLOBAL cannot treat a pattern like 'XXXX(YYYY)'
> in outside of a function well, because it seems to be a function definition.
I see. Is there a simple way to discover which macros are causing the
problem?
> Work around is here. Please also refer to the Q2 in 'FAQ' file in GLOBAL
> package.
>
> $ echo _ET_DECLARE_CHECKED >.notfunction
> $ gtags
> $ global -f erl_term.h
> ...
> is_arity_value 311 erl_term.h #define is_arity_value(x)
> (((x) & _TAG_HEADER_MASK) == _TAG_HEADER_ARITYVAL)
> is_sane_arity_value 312 erl_term.h #define is_sane_arity_value(x)
> ((((x) & _TAG_HEADER_MASK) == _TAG_HEADER_ARITYVAL) && \
Thank you. This worked!
Leo