Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Reply-To: From: "Anyos Bela" To: Subject: 1.3.2: gcc bug (NT 4.0) Date: Fri, 27 Jul 2001 15:48:24 +0200 Message-ID: <000e01c116a2$cee06510$b86e10ac@evosoft.hu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Hi Guys, I think I found a problem in connection with gcc 'token-pasting' operator (##) $ gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs gcc version 2.95.3-5 (cygwin special) I use cygwin v1.3.2 under NT 4.0 Service Pack 6. Here's a little example to show its failure: ( obviously it has no meaning, I used it just for demonstrating the problem ) -------------------- #define Glue(a,b) a##b #define TestDef /usr/X11R6 int main( int argc, char *argv[] ) { printf( "%s", Glue( TestDef,/lib ) ); return 0; } --------------------- Feeding this to gcc it produces the following on my computer: --------------------- $ gcc -E test.c # 1 "test.c" int main( int argc, char *argv[] ) { printf( "%s", /usr/X11R6 /lib ); return 0; } --------------------- Please notice the gap between '/usr/X11R6' and '/lib'. It only happens if the first paramter of the 'Glue' macro is another macro. If I use a literal it works fine! I also tested it on Linux and it worked fine there. Thanks for your help and best regards, Bela ps.: Can you please cc answers to me, because I'm not on the list, yet ! Thanks ! -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/