Message-ID: <3f3e4fcf$0$172$cc7c7865@news.luth.se> From: Martin Str|mberg Subject: Re: as and structs Newsgroups: comp.os.msdos.djgpp References: <3f3e2079$0$168$cc7c7865 AT news DOT luth DOT se> User-Agent: tin/1.4.6-20020816 ("Aerials") (UNIX) (NetBSD/1.6Q (alpha)) Date: 16 Aug 2003 15:37:51 GMT Lines: 34 NNTP-Posting-Host: speedy.ludd.luth.se X-Trace: 1061048271 news.luth.se 172 130.240.16.13 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hans-Bernhard Broeker wrote: : Martin Str|mberg wrote: :> and in y.S: :> #include "x.h" : That makes sense only rather rarely ... How should I use the same constants in C source and in assmebly source then? E. g. DEBUG in my example. :> 1. What should I do to make this work nicely with prototypes and :> structs in header files? : Enclose the C-only parts in some #ifdef, e.g. #ifdef __GNUC__ or : whatever. Which define makes a good C<->assembly discriminator? __GNUC__? :> 2. Why is CFLAGS missing while compiling y.S : Because, obviously, y.S is not a C source file! You wouldn't expect : the C++, Fortran or lex flags to be applied to assembler either, would : you? No. But for those I'd expect gpp, g77 or flex be called not gcc. In this case gcc _was_ called, hence I thought CFLAGS should apply. If you make make compile C++, Fortran or lex code with gcc (weird, but...) I'd expect CFLAGS to be used. Right, MartinS