Messages in this thread Patch in this message | | | Date | Tue, 18 Jul 2000 23:46:54 +0200 | From | Jakub Jelinek <> | Subject | [PATCH] 2.4.0-test5-pre2 preprocessing related fixes |
| |
Hi!
cpp in gcc 2.96 (and in the upcoming gcc3) is much more picky about bugs in the code or relying on undefined behaviour, as it tries to comply to standards. So, e.g. using a ## operator without left-hand or right-hand side is not good (and its removal in fact does not change anything with older cpp's). Also, there is an asm() fix, I really think the zatm author meant "=a" when writing "=eax" and not one of the 3 alternatives. The i386 boot/ code contains several asm comments which start with # if something or # else something This is again not very good, because it was really meant as comments and not preprocessor directives. And last, gcc3 -traditional preprocessor does not handle GNU varargs extensions, that's why it is traditional, pure K&R. So, .S files either have to be written to work with pure K&R cpp or be preprocessed without -traditional.
--- linux-2.4.0/drivers/char/ftape/lowlevel/ftape_syms.c.jj Wed May 20 21:54:37 1998 +++ linux-2.4.0/drivers/char/ftape/lowlevel/ftape_syms.c Tue Jul 18 19:09:38 2000 @@ -43,9 +43,9 @@ #include "../lowlevel/ftape-format.h" #if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) -# define FT_KSYM(sym) EXPORT_SYMBOL(##sym); +# define FT_KSYM(sym) EXPORT_SYMBOL(sym); #else -# define FT_KSYM(sym) X(##sym), +# define FT_KSYM(sym) X(sym), #endif #if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) --- linux-2.4.0/drivers/char/ftape/lowlevel/ftape-tracing.h.jj Fri Jan 23 20:38:04 1998 +++ linux-2.4.0/drivers/char/ftape/lowlevel/ftape-tracing.h Tue Jul 18 20:36:38 2000 @@ -149,7 +149,7 @@ extern void ftape_trace_log (const char */ #define TRACE_ABORT(res, i...) \ { \ - TRACE(##i); \ + TRACE(i); \ TRACE_EXIT res; \ } --- linux-2.4.0/drivers/char/ftape/zftape/zftape_syms.c.jj Wed May 20 21:54:37 1998 +++ linux-2.4.0/drivers/char/ftape/zftape/zftape_syms.c Tue Jul 18 20:48:10 2000 @@ -35,9 +35,9 @@ #include "../zftape/zftape-ctl.h" #if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) -# define FT_KSYM(sym) EXPORT_SYMBOL(##sym); +# define FT_KSYM(sym) EXPORT_SYMBOL(sym); #else -# define FT_KSYM(sym) X(##sym), +# define FT_KSYM(sym) X(sym), #endif #if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) --- linux-2.4.0/drivers/usb/microtek.c.jj Wed Jun 28 22:49:00 2000 +++ linux-2.4.0/drivers/usb/microtek.c Tue Jul 18 21:03:43 2000 @@ -151,18 +151,18 @@ static struct usb_driver mts_usb_driver #define MTS_NAME "microtek usb (rev " MTS_VERSION "): " #define MTS_WARNING(x...) \ - printk( KERN_WARNING MTS_NAME ## x ) + printk( KERN_WARNING MTS_NAME x ) #define MTS_ERROR(x...) \ - printk( KERN_ERR MTS_NAME ## x ) + printk( KERN_ERR MTS_NAME x ) #define MTS_INT_ERROR(x...) \ - MTS_ERROR( ## x ) + MTS_ERROR(x) #define MTS_MESSAGE(x...) \ - printk( KERN_INFO MTS_NAME ## x ) + printk( KERN_INFO MTS_NAME x ) #if defined MTS_DO_DEBUG #define MTS_DEBUG(x...) \ - printk( KERN_DEBUG MTS_NAME ## x ) + printk( KERN_DEBUG MTS_NAME x ) #define MTS_DEBUG_GOT_HERE() \ MTS_DEBUG("got to %s:%d (%s)\n", __FILE__, (int)__LINE__, __PRETTY_FUNCTION__ ) --- linux-2.4.0/drivers/atm/zatm.c.jj Tue Jun 20 16:58:42 2000 +++ linux-2.4.0/drivers/atm/zatm.c Tue Jul 18 22:03:42 2000 @@ -441,8 +441,8 @@ static void zatm_clock_sync(unsigned lon "shldl $" SX(TIMER_SHIFT) ",%1,%%edx\n\t" "shl $" SX(TIMER_SHIFT) ",%1\n\t" "divl %%ebx\n\t" - : "=eax" (zatm_dev->factor) - : "eax" (interval-diff),"g" (ticks), + : "=a" (zatm_dev->factor) + : "a" (interval-diff),"g" (ticks), "g" (zatm_dev->last_clk) : "ebx","edx","cc"); #undef S --- linux-2.4.0/arch/i386/lib/Makefile.jj Fri Jul 7 20:55:39 2000 +++ linux-2.4.0/arch/i386/lib/Makefile Tue Jul 18 18:56:39 2000 @@ -3,7 +3,7 @@ # .S.o: - $(CC) $(AFLAGS) -traditional -c $< -o $*.o + $(CC) $(AFLAGS) -c $< -o $*.o L_TARGET = lib.a L_OBJS = checksum.o old-checksum.o delay.o \ --- linux-2.4.0/arch/i386/kernel/i8259.c.jj Wed Jul 5 16:24:10 2000 +++ linux-2.4.0/arch/i386/kernel/i8259.c Tue Jul 18 18:47:39 2000 @@ -36,7 +36,7 @@ BUILD_COMMON_IRQ() #define BI(x,y) \ - BUILD_IRQ(##x##y) + BUILD_IRQ(x##y) #define BUILD_16_IRQS(x) \ BI(x,0) BI(x,1) BI(x,2) BI(x,3) \ --- linux-2.4.0/arch/i386/boot/setup.S.jj Wed Jul 5 15:03:12 2000 +++ linux-2.4.0/arch/i386/boot/setup.S Tue Jul 18 23:10:23 2000 @@ -81,7 +81,7 @@ start_sys_seg: .word SYSSEG type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin, # Bootlin, SYSLX, bootsect...) - # else it is set by the loader: + # Else it is set by the loader: # 0xTV: T=0 for LILO # T=1 for Loadlin # T=2 for bootsect-loader @@ -91,8 +91,8 @@ type_of_loader: .byte 0 # = 0, old one # flags, unused bits must be zero (RFU) bit within loadflags loadflags: -LOADED_HIGH = 1 # if set, the kernel is loaded high -CAN_USE_HEAP = 0x80 # if set, the loader also has set +LOADED_HIGH = 1 # If set, the kernel is loaded high +CAN_USE_HEAP = 0x80 # If set, the loader also has set # heap_end_ptr to tell how much # space behind setup.S can be used for # heap purposes. --- linux-2.4.0/arch/i386/boot/bootsect.S.jj Sun Feb 13 13:16:36 2000 +++ linux-2.4.0/arch/i386/boot/bootsect.S Tue Jul 18 23:20:14 2000 @@ -151,7 +151,7 @@ probe_loop: cbtw # extend to word movw %ax, sectors cmpw $disksizes+4, %si - jae got_sectors # if all else fails, try 9 + jae got_sectors # If all else fails, try 9 xchgw %cx, %ax # cx = track and sector xorw %dx, %dx # drive 0, head 0 Jakub
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |