* [PATCH] make fs/reiser4/search.c compile with gcc 4.0
@ 2004-09-22 18:45 Grzegorz Jaśkiewicz
2004-09-22 18:59 ` Valdis.Kletnieks
0 siblings, 1 reply; 4+ messages in thread
From: Grzegorz Jaśkiewicz @ 2004-09-22 18:45 UTC (permalink / raw)
To: reiserfs-list
Here's full message, this is linux 2.6.9-rc2-mm1
gcc -Wp,-MD,fs/reiser4/.search.o.d -nostdinc -iwithprefix include
-D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer
-Wdeclaration-after-statement -pipe -msoft-float
-mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=pentium3
-Iinclude/asm-i386/mach-default -Wformat -Wundef -Wunused -Wcomment
-Wno-nested-externs -Wno-write-strings -Wno-sign-compare
-Wuninitialized -DKBUILD_BASENAME=search -DKBUILD_MODNAME=reiser4 -c
-o fs/reiser4/.tmp_search.o fs/reiser4/search.c
fs/reiser4/search.c: In function 'cbk_node_lookup':
fs/reiser4/search.c:1111: error: invalid storage class for function 'key_is_ld'
gcc --version
gcc (GCC) 4.0.0 20040922 (experimental)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I know gcc 4.0 is still in it's alphas.
Obvious solution is to move function declared in other function
up-wards. Since it's static anyway, it won't make any diffrence.
Please consider applying to repo.
Thanks.
-----
--- fs/reiser4/search.c 2004-09-22 20:38:04 +0200
+++ fs/reiser4/search.new.c 2004-09-22 20:37:26 +0200
@@ -1088,6 +1088,20 @@
}
#endif
+/* true if @key is left delimiting key of @node */
+static int key_is_ld(znode * node, const reiser4_key * key) {
+ int ld;
+
+ assert("nikita-1716", node != NULL);
+ assert("nikita-1758", key != NULL);
+
+ RLOCK_DK(znode_get_tree(node));
+ assert("nikita-1759", znode_contains_key(node, key));
+ ld = keyeq(znode_get_ld_key(node), key);
+ RUNLOCK_DK(znode_get_tree(node));
+ return ld;
+}
+
/* Process one node during tree traversal.
This is called by cbk_level_lookup(). */
@@ -1107,19 +1121,6 @@
/* result */
int result;
- /* true if @key is left delimiting key of @node */
- static int key_is_ld(znode * node, const reiser4_key * key) {
- int ld;
-
- assert("nikita-1716", node != NULL);
- assert("nikita-1758", key != NULL);
-
- RLOCK_DK(znode_get_tree(node));
- assert("nikita-1759", znode_contains_key(node, key));
- ld = keyeq(znode_get_ld_key(node), key);
- RUNLOCK_DK(znode_get_tree(node));
- return ld;
- }
assert("nikita-379", h != NULL);
active = h->active_lh->node;
--
GJ
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] make fs/reiser4/search.c compile with gcc 4.0
2004-09-22 18:45 [PATCH] make fs/reiser4/search.c compile with gcc 4.0 Grzegorz Jaśkiewicz
@ 2004-09-22 18:59 ` Valdis.Kletnieks
2004-09-22 19:03 ` Grzegorz Jaśkiewicz
0 siblings, 1 reply; 4+ messages in thread
From: Valdis.Kletnieks @ 2004-09-22 18:59 UTC (permalink / raw)
To: Grzegorz Jaśkiewicz; +Cc: reiserfs-list
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
On Wed, 22 Sep 2004 20:45:55 +0200, =?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= said:
> I know gcc 4.0 is still in it's alphas.
> Obvious solution is to move function declared in other function
> up-wards. Since it's static anyway, it won't make any diffrence.
> Please consider applying to repo.
I'm not sure it's a good idea to be trying to "fix" reiser4 code to compile
with an alpha compiler, at least without a *very* firm commitment from the gcc
crew that this *is* a real error in the reiser4 code and not a bug in gcc
causing a spurious message.
Why does this code compile cleanly with gcc 3.x and fail with a 4.0 alpha?
Without knowing that, it's *STUPID* to change the code to suit the alpha...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] make fs/reiser4/search.c compile with gcc 4.0
2004-09-22 18:59 ` Valdis.Kletnieks
@ 2004-09-22 19:03 ` Grzegorz Jaśkiewicz
2004-09-22 19:09 ` Valdis.Kletnieks
0 siblings, 1 reply; 4+ messages in thread
From: Grzegorz Jaśkiewicz @ 2004-09-22 19:03 UTC (permalink / raw)
To: valdis.kletnieks@vt.edu; +Cc: reiserfs-list
On Wed, 22 Sep 2004 14:59:37 -0400, valdis.kletnieks@vt.edu
<valdis.kletnieks@vt.edu> wrote:
> On Wed, 22 Sep 2004 20:45:55 +0200, =?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= said:
>
> > I know gcc 4.0 is still in it's alphas.
> > Obvious solution is to move function declared in other function
> > up-wards. Since it's static anyway, it won't make any diffrence.
> > Please consider applying to repo.
>
> I'm not sure it's a good idea to be trying to "fix" reiser4 code to compile
> with an alpha compiler, at least without a *very* firm commitment from the gcc
> crew that this *is* a real error in the reiser4 code and not a bug in gcc
> causing a spurious message.
>
> Why does this code compile cleanly with gcc 3.x and fail with a 4.0 alpha?
> Without knowing that, it's *STUPID* to change the code to suit the alpha...
This code uses stuppid gcc extension, that is not present in gcc 4.0.
There is no reason to keep it that way in sources, at least I didn't found any.
Function is static anyway, so symbos are not going to be exported.
The fact that gcc 4.0 is not compiling it, is just another excuse to move it.
There is at least one more that kinda bug in kernel.
--
GJ
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] make fs/reiser4/search.c compile with gcc 4.0
2004-09-22 19:03 ` Grzegorz Jaśkiewicz
@ 2004-09-22 19:09 ` Valdis.Kletnieks
0 siblings, 0 replies; 4+ messages in thread
From: Valdis.Kletnieks @ 2004-09-22 19:09 UTC (permalink / raw)
To: Grzegorz Jaśkiewicz; +Cc: reiserfs-list
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
On Wed, 22 Sep 2004 21:03:45 +0200, =?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= said:
> This code uses stuppid gcc extension, that is not present in gcc 4.0.
OK, if it's using a GCC extension that's already officially deprecated in 3.X and will be
removed in 4.0, then that *is* a good reason to fix the code.
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-09-22 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-22 18:45 [PATCH] make fs/reiser4/search.c compile with gcc 4.0 Grzegorz Jaśkiewicz
2004-09-22 18:59 ` Valdis.Kletnieks
2004-09-22 19:03 ` Grzegorz Jaśkiewicz
2004-09-22 19:09 ` Valdis.Kletnieks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.