Problems with cplusplus in source files



Hello,

while searching for an error with 'purify' (from rational.com) and 'gtk', I
found the following statements:

#ifdef __cplusplus
	  switch (visual_list[i].c_class)
#else /* __cplusplus */
	  switch (visual_list[i].class)
#endif /* __cplusplus */

in the file 'gdk/gdkvisual.c'

The intention of the author is, that 'class' is a reseved keyword in C++, but
not in C.

But is the conceptional intention also, to compile the file two times, for C++,
C resp.? I don't think so ;-)

I think, gcc/g++ can handle it, but if you want to use eg. the cc/CC compiler
from Sun (so do I) and perhaps 'purify', you have to recompile it.

I think it's no problem to fix this.

regards

Michael Kellner, Univ. Passau, Germany





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]