Message-ID: <000101bf28d6$43e5a8a0$70f137cb@bae> From: "Barrie Treloar" To: Cc: Subject: cpp incorrectly adds space to end of maco expansions Date: Sun, 7 Nov 1999 14:42:09 +1030 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com Hi, My problem is that macros are being expanded with a trailing space. (A hex dump shows that the character from cpp is a space, 0x20) I dont believe that cpp should be behaving this way as it works as expected with gcc and Solaris. Can anyone please explain to me what I've done wrong with macro expansions? Perhaps some mis-configuration? Thanks Barrie Here is the example test file: ------ test.c --------------------------------------------------------- #define one 1 (one) ------------------------------------------------------------------------ When I compile this with gcc -v -E test.c I get the following output. Note the space after the macro expansion ------ test.c.out ---------------------------------------------------- Reading specs from /projects/djgpp/lib/specs gcc version 2.95 19990728 (release) /projects/djgpp/lib/gcc-lib/djgpp/2.95/cpp.exe -lang-c -v -isystem /projects/djgpp/bin/include -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dunix -Di386 - DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=2 -D__unix__ -D__i386__ -D__GO32__ -D_ _MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=2 -D__unix -D__i386 -D__GO32 -D__MS DOS -D__DJGPP=2 -D__DJGPP_MINOR=2 test.c GNU CPP version 2.95 19990728 (release) (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: /projects/djgpp/include /projects/djgpp/lib/gcc-lib/djgpp/2.95/include /projects/djgpp/include End of search list. The following default directories have been omitted from the search path: $DJDIR/lang/cxx $DJDIR/lib/gcc-lib/djgpp/2.95/../../../../djgpp/include End of omitted list. # 1 "test.c" (1 ) ------------------------------------------------------------------------