[PATCH 2] fix broken strict aliasing

Marc Lehmann schmorp at schmorp.de
Wed Feb 24 18:33:31 CET 2010


On Wed, Feb 24, 2010 at 11:19:20AM -0600, Brandon Black <blblack at gmail.com> wrote:
> and prevents an aliasing-related bug in the code (which would only
> manifest itself under optimization).  Whereas if the casts were
> changed, the opposite would be true: no warning, but yes bug.  You

"if the csast were absent, the opposite would be true"

> don't see why this is a confusing situation for users of gcc?  My

Users of gcc who don't enable those warnings will not be confused. You
have to ask to get confused.

> choices in this situation are seriously either get a warning or get a
> bug?

That's not uncommon in my experience.

Let me repeat it again: warnings are just that - warnings. They are no bug
indicators, they can be helpful, and they can be confusing.

> >> be related to gcc's authors either not adhering to the standard, or
> >> being "more strict" about aliasing than the standard strictly
> >> requires.
> >
> > gcc is documented to be less strict than C, btw.
> 
> Ok, so you're saying anything the C standard accepts in terms of legal
> aliasing, gcc will not mis-optimize?

No, I say that gcc is documented to be less strict than C. I didn't say
anything like what you claim I have said.

If gcc mis-optimsies something then it's kind of by definition a bug. Now
if gcc *optimisations* cause a bug to appear due to exploiting (lack
of) aliasing that is not actually in the C source, then it's a gcc bug,
too, because gcc is less strict about aliasing issues than standard C
(specifically the union exception).

> > It is hard for me to help you if you don't have any questions and just
> > make fullmouthed but wrong claims.
> 
> This is the kind of assault that makes our conversations almost
> unbearable.

Well, if you find it unbearable, you could stop? It's not as if _I_ was
assaulting you, am I? I am justz pointing out that it is extremely hard to
argue with somebody who makes loaded statements such as yours.

> Unless I misunderstand you, the problem here is that I'm
> mis-using the word aliasing.  You could have simply pointed out that
> I'm mis-using this technical term in this context, instead of ranting
> about false accusations.

How? Mind-reading?

Get real, how about just becoming more polite instead? I am sure peope will
treat you better if you start to treat them well first.

> If I change the phrase "libev's pointer-aliasing" to "libev's specific
> method of using pointers to typeA to point to objects of typeB", then
> the second statement is true, and is what I meant.

I don't think it is true - what's your evidence for that?

We could continue to argue, but as long as you keep making these wrong
statements, how should I react?

Will you tell me, again, that I could have *guessed* that you mean yet
another completely different thing?

> You do use ev_watcher pointers to refer to
> ev_io objects.

No.

> If that isn't an instance of aliasing, then I'm
> mis-using the term.  The mistake is that simple.

It would be an instance of aliasing.

It's just not what libev is doing - if it did, it would be buggy, so
since you insist so hard, how about finally coming with some evidence, or
dropping your claims?

> I'm done with the rest of this.  I think you know the answers to the
> questions I'm asking, but it's just not worth the abuse to figure out
> how to correctly ask you.

The problem is that your questions are loaded (look up "loaded questions"
on google). Loaded questions HAVE NO ANSWER.

All I do is to keep pointing out to you that your statements and questions
are loaded and make no sense, and are in fatc highly unfair.

IF you would ask fair and logical questions that actually have an answer, I
would helpfully answer them.

Until then, your "you know the answers" is just trolling.

If you disagree, then what is the answer to "why are you still beating
your wife?" - unless you atcually beat your wife, the only thing to answre
is "i don't beat my wife" which isn't an answer to the question.

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



More information about the libev mailing list