This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Define problems


On Sun, Jun 06, 2004 at 05:48:41PM +0200, David Fredin wrote:
> When running gcc 2.9.5 things work, but when running gcc 3.3.2 it doesn't this is the snippets that show what I mean:
> 
> From a normal .c file:
> NOT_ACCEL_MOVE(v, v->change_bounds(v, r));
> 
> From a normal .h file:
> #define TEST_SUB_VIEWS(o, x)                                            \
> do {                                                                    \
>     l_bool  tsv = VIEW(o)->is_draw_mode(VIEW(o), DWM_TESTSUBVIEWS);     \
>     VIEW(o)->set_draw_mode(VIEW(o), DWM_TESTSUBVIEWS, true);            \
>     ##x;                                                                \
>     VIEW(o)->set_draw_mode(VIEW(o), DWM_TESTSUBVIEWS, tsv);             \
> } while (0)
> 
> The error:
> Dev/src/object/view.c:1411:56: pasting ";" and "v" does not give a valid preprocessing token
> make.exe: *** [Dev/Obj/object/view.o] Error 1
> 
> 
> I don't know what to do, any ideas?

Why do you use concatenation? Do you know what it means? 
(see 'info cpp Macros Concatenation')

Just remove the concatenation (##) "operator" and it should work (but you don't 
show a complete example and there might be other issues).

PS: What is NOT_ACCEL_MOVE and what does it have to do with TEST_SUB_VIEWS?

--
Claudio 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]