JFS no longer compiles with gcc 2.95

JFS no longer compiles with gcc 2.95

Post by Dave Kleikam » Thu, 13 Feb 2003 17:00:19



I'm not sure what's causing the problem, but Andrew Morton send me this
patch which gets rid of the problem for him.  The fmt string that
jfs_err() is invoked with is sufficient to identify the location, so
__FILE__ and __LINE__ are not really needed anyway.

Linus, please apply.

Thanks,
Shaggy

diff -puN fs/jfs/jfs_debug.h~jfs-build-fix fs/jfs/jfs_debug.h
--- 25/fs/jfs/jfs_debug.h~jfs-build-fix 2003-02-12 02:20:40.000000000
-0800

 /* error event message: e.g., i/o error */
 #define jfs_err(fmt, arg...) do {                      \
        if (jfsloglevel >= JFS_LOGLEVEL_ERR)         \
-               printk(KERN_ERR "%s:%d " fmt "\n",  \
-                      __FILE__, __LINE__, ## arg);     \
+               printk(KERN_ERR fmt "\n", ## arg);    \
 } while (0)

 /*

--
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

JFS no longer compiles with gcc 2.95

Post by Adrian Bun » Thu, 13 Feb 2003 17:10:06



> I'm not sure what's causing the problem, but Andrew Morton send me this
> patch which gets rid of the problem for him.  The fmt string that
> jfs_err() is invoked with is sufficient to identify the location, so
> __FILE__ and __LINE__ are not really needed anyway.

> Linus, please apply.

> Thanks,
> Shaggy

> diff -puN fs/jfs/jfs_debug.h~jfs-build-fix fs/jfs/jfs_debug.h
> --- 25/fs/jfs/jfs_debug.h~jfs-build-fix    2003-02-12 02:20:40.000000000
> -0800
> +++ 25-akpm/fs/jfs/jfs_debug.h     2003-02-12 02:20:46.000000000 -0800

>  /* error event message: e.g., i/o error */
>  #define jfs_err(fmt, arg...) do {                 \
>    if (jfsloglevel >= JFS_LOGLEVEL_ERR)         \
> -          printk(KERN_ERR "%s:%d " fmt "\n",  \
> -                 __FILE__, __LINE__, ## arg);     \
> +          printk(KERN_ERR fmt "\n", ## arg);    \
>  } while (0)

>  /*

Ah, then it's a well-known 2.95 parser bug (sorry for not looking better
at it when sending my initial report). The following alternative patch
is sufficient to fix the compilation with 2.95 (it's your choice which
of the two patches you prefer):

--- linux-2.5.60-full/fs/jfs/jfs_debug.h.old    2003-02-12 15:59:14.000000000 +0100

 #define jfs_err(fmt, arg...) do {                      \
        if (jfsloglevel >= JFS_LOGLEVEL_ERR)         \
                printk(KERN_ERR "%s:%d " fmt "\n",  \
-                      __FILE__, __LINE__, ## arg);     \
+                      __FILE__ , __LINE__ , ## arg);   \
 } while (0)

 /*

Quote:> David Kleikamp

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

JFS no longer compiles with gcc 2.95

Post by Dave Kleikam » Thu, 13 Feb 2003 17:50:13



> Ah, then it's a well-known 2.95 parser bug (sorry for not looking
> better at it when sending my initial report). The following
> alternative patch is sufficient to fix the compilation with 2.95
> (it's your choice which of the two patches you prefer):

> --- linux-2.5.60-full/fs/jfs/jfs_debug.h.old       2003-02-12
> 15:59:14.000000000 +0100 +++
> linux-2.5.60-full/fs/jfs/jfs_debug.h       2003-02-12 15:59:35.000000000

>  #define jfs_err(fmt, arg...) do {                 \
>    if (jfsloglevel >= JFS_LOGLEVEL_ERR)         \
>            printk(KERN_ERR "%s:%d " fmt "\n",  \
> -                 __FILE__, __LINE__, ## arg);     \
> +                 __FILE__ , __LINE__ , ## arg);   \
>  } while (0)

>  /*

Interesting that the assert() macro in the same file is very similar,
but apparently doesn't have the same problem.  Do you know if it's tied
to the ## operator?  I'm not emotionally attached to __FILE__ and
__LINE__, so I'll just go with removing them, unless anyone wants to
change my mind.

Thanks,
Shaggy
--
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

JFS no longer compiles with gcc 2.95

Post by Andreas Schwa » Thu, 13 Feb 2003 18:30:11


|> Interesting that the assert() macro in the same file is very similar,
|> but apparently doesn't have the same problem.  Do you know if it's tied
|> to the ## operator?

Yes, there is a difference in the handling of ## wrt. varargs macros in
the case of no arguments.  Previously the compiler removed everything
before ## upto the next whitespace, whereas it now removes exactly the
last token.

Andreas.

--

SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nrnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.60: JFS no longer compiles with gcc 2.95

This broke the compilation with gcc 2.95:

<--  snip  -->

...
  gcc -Wp,-MD,fs/jfs/.super.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=k6
-Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include  
-D_JFS_4K  -DKBUILD_BASENAME=super -DKBUILD_MODNAME=jfs -c -o
fs/jfs/super.o fs/jfs/super.c
fs/jfs/super.c: In function `jfs_fill_super':
fs/jfs/super.c:335: parse error before `)'
make[2]: *** [fs/jfs/super.o] Error 1

<--  snip  -->

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. How to replace BASH ?

3. Kernel compile problem with (P)GCC 2.95

4. Urgent: Anybody got DIPLOGIN working??

5. Trying to compile gtkwave on Solaris 7 box, with GCC 2.95, having no luck.

6. Socket and IP level programing

7. Compiling with gcc 2.95 on Solaris 8 --> core dump

8. remote backup using dd, why ibs and obs needed

9. Compiling kernel with gcc 2.95?

10. Can't compile 2.0.36 w/gcc 2.95

11. gcc 2.95 compile error

12. compiling ksh93 with gcc 2.95.[23] fails

13. Compiling KDE 1.2 with gcc 2.95