meulenbr@cstw01.UUCP (Frans Meulenbroeks) (02/15/89)
Hi!
I encountered the following bug in gcc/cpp 1.31:
On compiling a macro which has a function call as one of its arguments,
cpp complains about too many arguments.
cc on sun does not have this problem.
Offending file:
contrib/windwomgrs/rtl/manage.c from the out of the box X11R3
distribution. I do not include the file since it is quite big.
If it is needed to repeat the bug, please drop me a note.
script:
1:uims> gcc -v -I/usr/cstu40/uims/X11R3 -O -sun3 -c manage.c
gcc version 1.31
/usr/cstu20/gadgets/lib/gcc-cpp -v -I/usr/cstu40/uims/X11R3 -undef
-D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__OPTIMIZE__
-D__HAVE_68881__ -Dmc68020 manage.c /tmp/cca23501.cpp
GNU CPP version 1.31
manage.c:3645: too many (5) args to macro `window_excursion'
1:uims> cc -O -I/usr/cstu40/uims/X11R3 -O -sun3 -c manage.c
1:uims>
Note: the command line is artificially broken since it will not fit on
one line.
The offending code:
height_excursion( uwinp->winp,
width_excursion( uwinp->winp,
window_excursion( uwinp->winp, REQUIRE_MANUAL_CLOSE, TRUE,
Manage_Finish( result ) ) ) );
The offending macro:
#define window_excursion(win,opt,val,code) \
{ \
bool temp_val; \
temp_val = Tilwin_Get_Window_Option(win,opt); \
Tilwin_Set_Window_Option(win,opt,val); \
code; \
Tilwin_Set_Window_Option(win,opt,temp_val); \
}
If you need additional info, please let me know.
Keep up the good work!
--
Frans Meulenbroeks (meulenbr@cst.prl.philips.nl)
Centre for Software Technology
( or try: ...!mcvax!philmds!prle!cst!meulenbr)