Few suggestions

Marc Lehmann schmorp at schmorp.de
Wed Jun 18 13:32:33 CEST 2008


On Wed, Jun 18, 2008 at 03:39:24PM -0700, nsf <no.smile.face at gmail.com> wrote:
> Well, I have already sent a patch to mailing list. I hope you didn't
> miss it. I just want to make sure you got is, so here is the link:
> http://lists.schmorp.de/pipermail/libev/attachments/20080617/73c9e0ca/attachment.bin

I didn't miss it, but I only saw it after you sent it.

> > you didn't just change your code to just ugly code, you took (potentially)
> > *working* code and *broke* it, invoking undefined behaviour.
> 
> As long as my code is giving me *exactly* the same behaviour as macros
> code, my code isn't broken.

Welcome to the world of stupid programmers then. The fact that your broken
code happens to result in a working program with *your* optimisation setting
and *your* compiler and *your* architecture and *your* operating system and
*your* compiler version doesn't make it correct to *anybody* else.

Sure, you might claim that, but thats just plain stupid, your code isn't
valid C (because it relies on uninitialised data happening to be 0), end
of story. The fact (or non-fact) that you might have luck with it with
your config doesn't make it non-broken.

> It is possible that on some configurations on some stupid compilers my

As I mentioned, the compiler you use (gcc) is so "stupid" in some cases.

Future versions will very likely be so "stupid" in many more cases, as global
optimisation techniques become even more global (intra-file).

> code is broken, but my software isn't portable. It is linux/gcc/x86
> software.

Your software is broken on linux/gcc/x86 already.

> > That's a blatant lie :) They are _broken_ without them. Get a
> > (necessarilys, as average books don't cover this) good book about C and
> > learn about aliasing rules.
> 
> Btw, timer-related variants actually purely identical in asm.

Because you are lucky and don't trigger the optimisation. Your program is
still broken.

> Anyway, I don't want to argue with you. It's your right to think your
> way. If it isn't possible for you to make changes, I'll leave hacks in
> my code or eventually I will change the library.

It is certainly possible for me to "make changes", but the changes you
suggest break the code for everybody.

I would be stupid to apply your buggy changes. This is not a question of
it being possible, but a question of it not being sensible.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list