Hello fellow pascalers! I have a problem with egcs-1.1.1 (egcs-2.91.60 19981201) and gpc-19990118 on Sun Solaris 2.6. Basically the #ifdef and #if defined() preprocessor stuff seems broken. The following code illustrates the problem: -------cut-------- program cpptest(input,output); begin #ifdef __GPC__ writeln('#ifdef __GPC__'); #endif #if defined (__GPC__) writeln('defined (__GPC__)'); #endif end. ------cut---------- When this is compiled with gpc -o test test.p (!) and you run it you get the following output on Sun Solaris: #ifdef __GPC__ On Linux and Digital UNIX (same compiler combination) you get: #ifdef __GPC__ defined (__GPC__) which is of course correct. Note that using the -v switch indicates that the compile is setting -D__GPC__=2 on all systems. Am I doing something hopelessly stupid or is this a bug ? Thanks for all your help. Ian -- Ian Thurlbeck http://www.stams.strath.ac.uk/ Statistics and Modelling Science, University of Strathclyde Livingstone Tower, 26 Richmond Street, Glasgow, UK, G1 1XH Tel: +44 (0)141 548 3667 Fax: +44 (0)141 552 2079
participants (1)
-
ian@stams.strath.ac.uk