Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-11 Thread Pavel Machek
Hi! > > (2) Make the architecture a configuration variable (!) > > Why? > > You still need to have all the damn cross-compilers etc. At which point > being a configuration variable is the _least_ of your worries. You're > better off with just a new tree. Crosscompilers are easy: take

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-11 Thread Pavel Machek
Hi! (2) Make the architecture a configuration variable (!) Why? You still need to have all the damn cross-compilers etc. At which point being a configuration variable is the _least_ of your worries. You're better off with just a new tree. Crosscompilers are easy: take pre-compiled

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-08 Thread Nix
Martin Dalecki <[EMAIL PROTECTED]> writes: > There is some facility allowing to implement this kind of things > in the C++ part of the most recent EGCS version which makes implementing > such things "relatively" easy - basiclly there is the provision to dump > the parser trees as easy to process

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Keith Owens
On Thu, 7 Sep 2000 19:14:26 -0500, Michael Elizabeth Chastain <[EMAIL PROTECTED]> wrote: >> Yeah. Long transition, plus user education (which never works, dontcha >> know), plus probably a helper tool akin to checkconfig. > >I think it would help to have a well documented "module writers kit".

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Michael Elizabeth Chastain
> Yeah. Long transition, plus user education (which never works, dontcha > know), plus probably a helper tool akin to checkconfig. I think it would help to have a well documented "module writers kit". (Maybe there is one and I'm not aware of it). mec> I'm all in favor of 'if ( CONFIG_BAR )',

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Peter Samuelson
[mec] > In the .config file, the problem is that the Makefiles source .config > and then do a lot of "ifdef CONFIG_FOO" tests. There are about 300 > instances of this in 2.4.0-test-7. Separate issue. We're not talking about emitting n symbols to .config, or at least I'm not. In this thread.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Michael Elizabeth Chastain
In the .config file, the problem is that the Makefiles source .config and then do a lot of "ifdef CONFIG_FOO" tests. There are about 300 instances of this in 2.4.0-test-7. In include/linux/autoconf.h, the problem is in the *.c (and *.h and *.S) files that do a lot of "#ifdef CONFIG_BAR" and

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Mark H. Wood
If you want to look at an existing source-code analyzer that works hand-in-glove with compilers, to skim for good or bad ideas, take a look at the LSE/SCA combo from the DECset tools. (Dunno if DECset is even still available; I lost track of what went where as they were dicing up the company.)

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Jamie Lokier
David Woodhouse wrote: > But how much work would it require to do so? If your theoretical vendor of > closed-source compiler backends were to believe that a shared lib of the > GCC frontend would be legal, surely they'd just make it shared themselves, > then use it as such? It's hardly a

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Peter Samuelson
[viro] > The _real_ problem is preprocessor abuse. BTW, could we schedule for > 2.5 the following? > * things like CONFIG_FOO are _always_ defined. As 0 or 1, that is. > * #ifdef CONFIG_FOO => if (CONFIG_FOO) in *.c. gcc will kill the unused > branches just fine.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Peter Samuelson
[viro] > > making the internal API frozen by exposure to library users. [Gooch] > An exercise in decent API design. BFD. ^^^ Nah, that's the *de*compilation library. (Sorry, couldn't resist.) Peter - To unsubscribe from this list: send the line

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread David Woodhouse
[EMAIL PROTECTED] said: > Shared library linkage brings you into the same grey area that binary > only kernel modules fall into, this means it's risky and this is > almost certainly how the GCC team views this situation. But how much work would it require to do so? If your theoretical vendor

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Christoph Hellwig
Michael Elizabeth Chastain <[EMAIL PROTECTED]> wrote: > We could use some more infrastructure here. > (1) A 'make randomconfig' tool that generates a random configuration. mconfig -m random, it's even written by you ;) my current mconfig working version is on

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Adrian Cox
Michael Elizabeth Chastain wrote: > (c) With separate source and build trees, which I've implemented, > it becomes a lot more feaasible to manage kernel builds for > multiple platforms. Is this released? I build most of my kernels for both x86 and PowerPC, plus I build several

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Christoph Hellwig
Michael Elizabeth Chastain [EMAIL PROTECTED] wrote: We could use some more infrastructure here. (1) A 'make randomconfig' tool that generates a random configuration. mconfig -m random, it's even written by you ;) my current mconfig working version is on

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Peter Samuelson
[viro] making the internal API frozen by exposure to library users. [Gooch] An exercise in decent API design. BFD. ^^^ Nah, that's the *de*compilation library. (Sorry, couldn't resist.) Peter - To unsubscribe from this list: send the line "unsubscribe

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Peter Samuelson
[viro] The _real_ problem is preprocessor abuse. BTW, could we schedule for 2.5 the following? * things like CONFIG_FOO are _always_ defined. As 0 or 1, that is. * #ifdef CONFIG_FOO = if (CONFIG_FOO) in *.c. gcc will kill the unused branches just fine. Notwithstanding the

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Mark H. Wood
If you want to look at an existing source-code analyzer that works hand-in-glove with compilers, to skim for good or bad ideas, take a look at the LSE/SCA combo from the DECset tools. (Dunno if DECset is even still available; I lost track of what went where as they were dicing up the company.)

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Michael Elizabeth Chastain
In the .config file, the problem is that the Makefiles source .config and then do a lot of "ifdef CONFIG_FOO" tests. There are about 300 instances of this in 2.4.0-test-7. In include/linux/autoconf.h, the problem is in the *.c (and *.h and *.S) files that do a lot of "#ifdef CONFIG_BAR" and

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Michael Elizabeth Chastain
Yeah. Long transition, plus user education (which never works, dontcha know), plus probably a helper tool akin to checkconfig. I think it would help to have a well documented "module writers kit". (Maybe there is one and I'm not aware of it). mec I'm all in favor of 'if ( CONFIG_BAR )', but

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Keith Owens
On Thu, 7 Sep 2000 19:14:26 -0500, Michael Elizabeth Chastain [EMAIL PROTECTED] wrote: Yeah. Long transition, plus user education (which never works, dontcha know), plus probably a helper tool akin to checkconfig. I think it would help to have a well documented "module writers kit". (Maybe

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-07 Thread Jamie Lokier
David Woodhouse wrote: But how much work would it require to do so? If your theoretical vendor of closed-source compiler backends were to believe that a shared lib of the GCC frontend would be legal, surely they'd just make it shared themselves, then use it as such? It's hardly a effective

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread David S. Miller
Date: Wed, 6 Sep 2000 14:42:17 -0700 (PDT) From: Jonathan Walther <[EMAIL PROTECTED]> If the shared library is under GPL (not LGPL) that isn't a problem. No? Shared library linkage brings you into the same grey area that binary only kernel modules fall into, this means it's risky

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread David S. Miller
Date:Wed, 6 Sep 2000 08:59:56 -0600 From: Richard Gooch <[EMAIL PROTECTED]> Jamie Lokier writes: > Sorry, there's a GCC policy decision against putting it into a > shared library. Why? Because this allows proprietary software vendor X to write closed-source compiler

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Martin Dalecki
Alexander Viro wrote: > > On Wed, 6 Sep 2000, Martin Dalecki wrote: > > > > > So may I just suggest to repleace the usage of cpp at all with something > > more > > suitable for the task at hand and with a much more regular/stringent > > syntax > > better fitting into the syntax of the pure C

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
On Wed, 6 Sep 2000, Alexander Viro wrote: > > Add "and that broken code gets fixed in utterly bogus ways 20 versions > down the road, when nobody remembers WTF had happened". Repeat several > times (and rarely-used parts _will_ accumulate such crap) and you've got > Lovecraftian beasts lurking

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Martin Dalecki wrote: > > So may I just suggest to repleace the usage of cpp at all with something > more > suitable for the task at hand and with a much more regular/stringent > syntax > better fitting into the syntax of the pure C language like m4 for > example? > No.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Alexander Viro wrote: > > > On 6 Sep 2000, Linus Torvalds wrote: > > > However, what I think Al Viro dislikes about this is that it does tend > > to leave code that won't compile, just because some of the accesses are > > in places that the compiler doesn't see due to

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Martin Dalecki
Alexander Viro wrote: > > On Wed, 6 Sep 2000, Michael Elizabeth Chastain wrote: > > > We could use some more infrastructure here. > > > > (1) A 'make randomconfig' tool that generates a random configuration. > > > > (2) Make the architecture a configuration variable (!) > > > > (3) A collection

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Michael Elizabeth Chastain
Linus writes ... mec> (2) Make the architecture a configuration variable (!) linus> Why? The real reason is that it's the right thing to do. Part of a configuration is "what machine it's for". Here are some benefits: (a) Arjan's testing machinery would catch problems in all architectures,

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Michael Elizabeth Chastain
r > (0) knowledge that CONFIG.FOO15 doesn't affect anything other than set of > source files being compiled. The Makefiles already know this. Specifically, mkdep.c analyzes which C files depend on which options. Look at some of your .depend files. Michael - To unsubscribe from this list: send

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On 6 Sep 2000, Linus Torvalds wrote: > However, what I think Al Viro dislikes about this is that it does tend > to leave code that won't compile, just because some of the accesses are > in places that the compiler doesn't see due to the pre-processor (or due > to other build-rules: like in

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
On Wed, 6 Sep 2000, Michael Elizabeth Chastain wrote: > > We could use some more infrastructure here. > > (1) A 'make randomconfig' tool that generates a random configuration. There already are people that do this. The problem is that developers are lazy. All good programmers are lazy. They

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Michael Elizabeth Chastain wrote: > We could use some more infrastructure here. > > (1) A 'make randomconfig' tool that generates a random configuration. > > (2) Make the architecture a configuration variable (!) > > (3) A collection of RPM's so that people can download

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On 6 Sep 2000, Linus Torvalds wrote: > At the same time, there is no question that true #ifdef's have > advantages, even outside the issue of gcc's inability to forget literal > strings. They are often required for data structures in general: C does > not have "conditional data structures".

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Michael Elizabeth Chastain
We could use some more infrastructure here. (1) A 'make randomconfig' tool that generates a random configuration. (2) Make the architecture a configuration variable (!) (3) A collection of RPM's so that people can download and install all the cross tools easily. With this stuff available,

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Arjan van de Ven
In article <8p5u21$r0$[EMAIL PROTECTED]> you wrote: > However, what I think Al Viro dislikes about this is that it does tend > to leave code that won't compile, just because some of the accesses are > in places that the compiler doesn't see due to the pre-processor (or due > to other

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
In article <[EMAIL PROTECTED]>, Jamie Lokier <[EMAIL PROTECTED]> wrote: >Linus Torvalds wrote: >> And I'm saying that if people really want to do this, then use the >> computer to do it for you, having more than just "grep", and making your >> tools aware of it. > >I'd just like to add, for the

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
In article <[EMAIL PROTECTED]>, Andrew Morton <[EMAIL PROTECTED]> wrote: > >But still, doing the conditional compilation at compile-time rather than >preprocessing-time is so *nice* that if you don't have too many literal >strings floating about it may be justifiable. > >In cs89x0.c you reduce

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Richard Gooch
Alexander Viro writes: > > > > On Wed, 6 Sep 2000, Richard Gooch wrote: > > > Jamie Lokier writes: > > > Chris Wedgwood wrote: > > > > I think would be really cool if all this 'magic' in gcc (whatever > > > > part of gcc is irrelevant right now) would be exported into a library > > > > or

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Richard Gooch wrote: > Jamie Lokier writes: > > Chris Wedgwood wrote: > > > I think would be really cool if all this 'magic' in gcc (whatever > > > part of gcc is irrelevant right now) would be exported into a library > > > or shared object which editors could then load

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Alan Cox wrote: > > As readability - it's definitely at least as readable as > > #if[def]. It also provides more consistent syntax. And when you are > > using ifdef to violate scoping - your code is in need of rewrite anyway. > > You still need the #ifdef stuff as

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Richard Gooch
Jamie Lokier writes: > Chris Wedgwood wrote: > > I think would be really cool if all this 'magic' in gcc (whatever > > part of gcc is irrelevant right now) would be exported into a library > > or shared object which editors could then load and use... dynamically > > perhaps. > > Sorry, there's a

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Jamie Lokier
Chris Wedgwood wrote: > I think would be really cool if all this 'magic' in gcc (whatever > part of gcc is irrelevant right now) would be exported into a library > or shared object which editors could then load and use... dynamically > perhaps. Sorry, there's a GCC policy decision against

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Jamie Lokier
Linus Torvalds wrote: > And I'm saying that if people really want to do this, then use the > computer to do it for you, having more than just "grep", and making your > tools aware of it. I'd just like to add, for the benefit of onlookers, that this is quite easy. Temporarily change name of

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Jamie Lokier
Chris Wedgwood wrote: [Gcc not eliminating trivial dead code... did you compile without optimisation?] Gcc 2.96 does remove the unreached code in your example, but it still emits string constants. int func() { if (1) a = "foo"; else a = "bar"; } .LC0: .string "foo" .LC1:

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alan Cox
> As readability - it's definitely at least as readable as > #if[def]. It also provides more consistent syntax. And when you are > using ifdef to violate scoping - your code is in need of rewrite anyway. You still need the #ifdef stuff as well for half of it so I dont see what it buys you

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Kai Henningsen
[EMAIL PROTECTED] (Martin Dalecki) wrote on 06.09.00 in <[EMAIL PROTECTED]>: > Alexander Viro wrote: > > > > On Wed, 6 Sep 2000, Martin Dalecki wrote: > > > > > Easy - the same way you do for cross compilation. Basically just: > > > > > > export CC=g++ --some-magic-long-option-i-dont-remember;

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Kai Henningsen
[EMAIL PROTECTED] (Martin Dalecki) wrote on 06.09.00 in [EMAIL PROTECTED]: Alexander Viro wrote: On Wed, 6 Sep 2000, Martin Dalecki wrote: Easy - the same way you do for cross compilation. Basically just: export CC=g++ --some-magic-long-option-i-dont-remember; make ... and

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alan Cox
As readability - it's definitely at least as readable as #if[def]. It also provides more consistent syntax. And when you are using ifdef to violate scoping - your code is in need of rewrite anyway. You still need the #ifdef stuff as well for half of it so I dont see what it buys you -

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Richard Gooch
Jamie Lokier writes: Chris Wedgwood wrote: I think would be really cool if all this 'magic' in gcc (whatever part of gcc is irrelevant right now) would be exported into a library or shared object which editors could then load and use... dynamically perhaps. Sorry, there's a GCC policy

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Alan Cox wrote: As readability - it's definitely at least as readable as #if[def]. It also provides more consistent syntax. And when you are using ifdef to violate scoping - your code is in need of rewrite anyway. You still need the #ifdef stuff as well for

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Richard Gooch wrote: Jamie Lokier writes: Chris Wedgwood wrote: I think would be really cool if all this 'magic' in gcc (whatever part of gcc is irrelevant right now) would be exported into a library or shared object which editors could then load and use...

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Richard Gooch
Alexander Viro writes: On Wed, 6 Sep 2000, Richard Gooch wrote: Jamie Lokier writes: Chris Wedgwood wrote: I think would be really cool if all this 'magic' in gcc (whatever part of gcc is irrelevant right now) would be exported into a library or shared object which

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
In article [EMAIL PROTECTED], Jamie Lokier [EMAIL PROTECTED] wrote: Linus Torvalds wrote: And I'm saying that if people really want to do this, then use the computer to do it for you, having more than just "grep", and making your tools aware of it. I'd just like to add, for the benefit of

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Arjan van de Ven
In article 8p5u21$r0$[EMAIL PROTECTED] you wrote: However, what I think Al Viro dislikes about this is that it does tend to leave code that won't compile, just because some of the accesses are in places that the compiler doesn't see due to the pre-processor (or due to other build-rules: like

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Michael Elizabeth Chastain
We could use some more infrastructure here. (1) A 'make randomconfig' tool that generates a random configuration. (2) Make the architecture a configuration variable (!) (3) A collection of RPM's so that people can download and install all the cross tools easily. With this stuff available,

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On 6 Sep 2000, Linus Torvalds wrote: At the same time, there is no question that true #ifdef's have advantages, even outside the issue of gcc's inability to forget literal strings. They are often required for data structures in general: C does not have "conditional data structures".

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Michael Elizabeth Chastain wrote: We could use some more infrastructure here. (1) A 'make randomconfig' tool that generates a random configuration. (2) Make the architecture a configuration variable (!) (3) A collection of RPM's so that people can download and

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
On Wed, 6 Sep 2000, Michael Elizabeth Chastain wrote: We could use some more infrastructure here. (1) A 'make randomconfig' tool that generates a random configuration. There already are people that do this. The problem is that developers are lazy. All good programmers are lazy. They want

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Michael Elizabeth Chastain
Linus writes ... mec (2) Make the architecture a configuration variable (!) linus Why? The real reason is that it's the right thing to do. Part of a configuration is "what machine it's for". Here are some benefits: (a) Arjan's testing machinery would catch problems in all architectures,

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Martin Dalecki
Alexander Viro wrote: On Wed, 6 Sep 2000, Michael Elizabeth Chastain wrote: We could use some more infrastructure here. (1) A 'make randomconfig' tool that generates a random configuration. (2) Make the architecture a configuration variable (!) (3) A collection of RPM's so that

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Alexander Viro wrote: On 6 Sep 2000, Linus Torvalds wrote: However, what I think Al Viro dislikes about this is that it does tend to leave code that won't compile, just because some of the accesses are in places that the compiler doesn't see due to the

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Alexander Viro
On Wed, 6 Sep 2000, Martin Dalecki wrote: IRONY ON So may I just suggest to repleace the usage of cpp at all with something more suitable for the task at hand and with a much more regular/stringent syntax better fitting into the syntax of the pure C language like m4 for example? /IRONY

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Linus Torvalds
On Wed, 6 Sep 2000, Alexander Viro wrote: Add "and that broken code gets fixed in utterly bogus ways 20 versions down the road, when nobody remembers WTF had happened". Repeat several times (and rarely-used parts _will_ accumulate such crap) and you've got Lovecraftian beasts lurking in

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread Martin Dalecki
Alexander Viro wrote: On Wed, 6 Sep 2000, Martin Dalecki wrote: IRONY ON So may I just suggest to repleace the usage of cpp at all with something more suitable for the task at hand and with a much more regular/stringent syntax better fitting into the syntax of the pure C language

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-06 Thread David S. Miller
Date:Wed, 6 Sep 2000 08:59:56 -0600 From: Richard Gooch [EMAIL PROTECTED] Jamie Lokier writes: Sorry, there's a GCC policy decision against putting it into a shared library. Why? Because this allows proprietary software vendor X to write closed-source compiler

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Andrew Morton
Richard Gooch wrote: > > It will probably take about 5 years after a new version of GCC which > has this fix before we can trust it to produce correct code for the > kernel. I don't think it's that bad, Richard. As davem points out, the dead code elimination works OK. Chris has a

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Mike A. Harris
On Wed, 6 Sep 2000, Martin Dalecki wrote: >Basically I will just guess: The next maybe non free version of >source navigator will use the mechanism I have just described above. >So maybe there is already someone at RedHat doing exactly this work >already ;-). Source Navigator is GPL open source

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Richard Gooch
Alexander Viro writes: > > > > On Wed, 6 Sep 2000, Andrew Morton wrote: > > > > cat t.c > > foo() > > { > > if (0) > > bar("hhh"); > > } > > > gcc -O2 -c t.c > > > strings t.o | grep hhh > > hhh Nasty, eh? > Eww... Do they _ever_ remove dead code? I guess

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread David S. Miller
Date:Tue, 5 Sep 2000 21:32:45 -0400 (EDT) From: Alexander Viro <[EMAIL PROTECTED]> On Wed, 6 Sep 2000, Andrew Morton wrote: > > gcc -O2 -c t.c > > strings t.o | grep hhh > hhh Eww... Do they _ever_ remove dead code? They remove the code, they just forget to

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Andrew Morton wrote: > > cat t.c > foo() > { > if (0) > bar("hhh"); > } > > gcc -O2 -c t.c > > strings t.o | grep hhh > hhh Eww... Do they _ever_ remove dead code? - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Andrew Morton
Alexander Viro wrote: > > > if (CONFIG_FOO) { > > } else { > > } There are a zillion reasons why this technique is superior to using `#ifdef CONFIG_FOO'. But, alas, gcc fumbles the ball: > cat t.c foo() { if (0)

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Chris Wedgwood wrote: > Oh, yes there is. > > if (CONFIG_FOO) { > > } else { > > } > > gcc can optimize that away and parser will see the whole thing. > > I'm not sure I like this construct either.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Martin Dalecki wrote: > Alexander Viro wrote: > > > > On Wed, 6 Sep 2000, Martin Dalecki wrote: > > > > > Easy - the same way you do for cross compilation. Basically just: > > > > > > export CC=g++ --some-magic-long-option-i-dont-remember; make > > > > ... and you still

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Martin Dalecki
Alexander Viro wrote: > > On Wed, 6 Sep 2000, Martin Dalecki wrote: > > > Easy - the same way you do for cross compilation. Basically just: > > > > export CC=g++ --some-magic-long-option-i-dont-remember; make > > ... and you still have only a subset of the tree, simply because it is fed >

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Martin Dalecki wrote: > Easy - the same way you do for cross compilation. Basically just: > > export CC=g++ --some-magic-long-option-i-dont-remember; make ... and you still have only a subset of the tree, simply because it is fed through cpp before it reaches the parser.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Andi Kleen
On Tue, Sep 05, 2000 at 07:19:11PM -0400, Peter Rival wrote: > Linus Torvalds wrote: > > > On Wed, 6 Sep 2000, Chris Wedgwood wrote: > > > > > > There are several other structures that have the same problem; very > > > generic sounding members. I wonder would a patch changing struct page > > >

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Martin Dalecki
Linus Torvalds wrote: > > On Tue, 5 Sep 2000, Alexander Viro wrote: > > > > > > What would be acceptable is something that understands C, and that can be > > > used to follow these things. Like "tags". > > > > I don't like hungarian notation too, but tags is out of question, > >

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Linus Torvalds
On Wed, 6 Sep 2000, Chris Wedgwood wrote: > > There are several other structures that have the same problem; very > generic sounding members. I wonder would a patch changing struct page > to something like this be acceptable? No. What would be acceptable is something that understands C, and

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Tue, 5 Sep 2000, Linus Torvalds wrote: > > > On Wed, 6 Sep 2000, Chris Wedgwood wrote: > > > > There are several other structures that have the same problem; very > > generic sounding members. I wonder would a patch changing struct page > > to something like this be acceptable? > > No.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Chris Wedgwood wrote: > On Tue, Sep 05, 2000 at 04:15:29PM -0400, Alexander Viro wrote: > > 2.5 the following? > * things like CONFIG_FOO are _always_ defined. As 0 or 1, that is. > * #ifdef CONFIG_FOO => if (CONFIG_FOO) in *.c. gcc will kill the unused >

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Linus Torvalds
On Wed, 6 Sep 2000, Chris Wedgwood wrote: There are several other structures that have the same problem; very generic sounding members. I wonder would a patch changing struct page to something like this be acceptable? No. What would be acceptable is something that understands C, and that

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Martin Dalecki
Linus Torvalds wrote: On Tue, 5 Sep 2000, Alexander Viro wrote: What would be acceptable is something that understands C, and that can be used to follow these things. Like "tags". I don't like hungarian notation too, but tags is out of question, unfortunately. Too much

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Andi Kleen
On Tue, Sep 05, 2000 at 07:19:11PM -0400, Peter Rival wrote: Linus Torvalds wrote: On Wed, 6 Sep 2000, Chris Wedgwood wrote: There are several other structures that have the same problem; very generic sounding members. I wonder would a patch changing struct page to something like

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Martin Dalecki wrote: Easy - the same way you do for cross compilation. Basically just: export CC=g++ --some-magic-long-option-i-dont-remember; make ... and you still have only a subset of the tree, simply because it is fed through cpp before it reaches the parser.

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Martin Dalecki
Alexander Viro wrote: On Wed, 6 Sep 2000, Martin Dalecki wrote: Easy - the same way you do for cross compilation. Basically just: export CC=g++ --some-magic-long-option-i-dont-remember; make ... and you still have only a subset of the tree, simply because it is fed through cpp

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Chris Wedgwood wrote: Oh, yes there is. if (CONFIG_FOO) { } else { } gcc can optimize that away and parser will see the whole thing. I'm not sure I like this construct either. Yes,

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Andrew Morton
Alexander Viro wrote: if (CONFIG_FOO) { } else { } There are a zillion reasons why this technique is superior to using `#ifdef CONFIG_FOO'. But, alas, gcc fumbles the ball: cat t.c foo() { if (0)

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Alexander Viro
On Wed, 6 Sep 2000, Andrew Morton wrote: cat t.c foo() { if (0) bar("hhh"); } gcc -O2 -c t.c strings t.o | grep hhh hhh Eww... Do they _ever_ remove dead code? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Richard Gooch
Alexander Viro writes: On Wed, 6 Sep 2000, Andrew Morton wrote: cat t.c foo() { if (0) bar("hhh"); } gcc -O2 -c t.c strings t.o | grep hhh hhh Nasty, eh? Eww... Do they _ever_ remove dead code? I guess not. Also, even if we get the

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Mike A. Harris
On Wed, 6 Sep 2000, Martin Dalecki wrote: Basically I will just guess: The next maybe non free version of source navigator will use the mechanism I have just described above. So maybe there is already someone at RedHat doing exactly this work already ;-). Source Navigator is GPL open source

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread Andrew Morton
Richard Gooch wrote: It will probably take about 5 years after a new version of GCC which has this fix before we can trust it to produce correct code for the kernel. I don't think it's that bad, Richard. As davem points out, the dead code elimination works OK. Chris has a counter-example

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-05 Thread David S. Miller
Date:Tue, 5 Sep 2000 21:32:45 -0400 (EDT) From: Alexander Viro [EMAIL PROTECTED] On Wed, 6 Sep 2000, Andrew Morton wrote: gcc -O2 -c t.c strings t.o | grep hhh hhh Eww... Do they _ever_ remove dead code? They remove the code, they just forget to mark the

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM now?

2000-09-04 Thread Daniel Phillips
Arjan van de Ven wrote: > > In article <[EMAIL PROTECTED]> you >wrote: > > > Well, the bug seems to exactly using the page after a "free_page()". Which > > is always a bug, but at least should be easy to fix. > > > I've considered making "free_page()" a macro something like > > >

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM now?

2000-09-04 Thread Daniel Phillips
Arjan van de Ven wrote: In article [EMAIL PROTECTED] you wrote: Well, the bug seems to exactly using the page after a "free_page()". Which is always a bug, but at least should be easy to fix. I've considered making "free_page()" a macro something like __free_page(x);

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-03 Thread Alexander Viro
On Mon, 4 Sep 2000, Jamie Lokier wrote: > Alexander Viro wrote: > > > *((unsigned long *)()) = NULL; > > > > free_page(foo()) and we've got problems... > > Alan really meant > > *((unsigned long *)&(x)) = NULL; > > and screw you if it's not an lvalue. There's a lot of places that

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-03 Thread Jamie Lokier
Alexander Viro wrote: > > *((unsigned long *)()) = NULL; > > free_page(foo()) and we've got problems... Alan really meant *((unsigned long *)&(x)) = NULL; and screw you if it's not an lvalue. -- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-03 Thread Alexander Viro
On Sun, 3 Sep 2000, Alan Cox wrote: > > I've considered making "free_page()" a macro something like > > > > __free_pge(x); > > x = NULL; > > > > but that works only for lvalues, of course, and not all users are > > lvalue-users, so it's hard to do. But that would have caught this. >

Re: 2.4.0-test8-pre1 is quite bad / how about integrating Rik's VM

2000-09-03 Thread Alan Cox
> I've considered making "free_page()" a macro something like > > __free_pge(x); > x = NULL; > > but that works only for lvalues, of course, and not all users are > lvalue-users, so it's hard to do. But that would have caught this. Not that hard. (barf buckets at the ready)

  1   2   >