public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: mike stump <mrs@windriver.com>
To: gdr@codesourcery.com, neil@daikokuya.demon.co.uk
Cc: gcc@gcc.gnu.org, pfeifer@dbai.tuwien.ac.at, rodrigc@mediaone.net,
	zack@codesourcery.com
Subject: Re: ICE in change_address at emit_rtl.c
Date: Wed, 14 Nov 2001 12:01:00 -0000	[thread overview]
Message-ID: <200111240140.RAA08504@kankakee.wrs.com> (raw)

> Date: Fri, 23 Nov 2001 19:14:38 +0000
> From: Neil Booth <neil@daikokuya.demon.co.uk>
> To: Gabriel Dos Reis <gdr@codesourcery.com>

> > | I've not been able to find a satisfactory fix; since I'm not a fan of
> > | error_mark_node-s I don't want to introduce yet more checks for them.
> > | I hate the error_mark_node stuff; it would be nice if it could go
> > | away.
> > 
> > What should be the alternative?

> Generate something that is valid, even if it's not what the user
> specified.

Then you generate a spew of bad messages making gcc substantially
worse from the users perspective, or you in the end rediscover why
error_mark_node exists.  In the end, you can merely replace
error_mark_node with something equivalent, but in the end I can't help
but wonder that you'll have exactly what you started with, just with
all the code shaken up, or something substantially worse.

The theoretics are simple and trivial, for all X, for all OP, nil OP X
--> nil, and X OP nil --> nil.  In our case, nil == error_mark_node.

We hand optimize the checks for nil, opps, I mean, error_mark_node, to
just a few places where they can be (assuming that they don't happen
in other places), which is icky and unmaintainable and what I feel you
are reeling against.  Instead, imagine a language where this check for
nil was part of the language and the user didn't have to write any
code for it, and you will `see' the beauty in the code.  Kinda like
reading the callbacks in C as virtual functions and abstract object
factories and the like, and not being phased by the spelling.
Callbacks in C are ugly to the untrained eye, to a C++ person, a few
specific styles of callbacks are less than gross, even, dare say,
beautiful.

You want it to be better, well, a language upgrade that manages the
code for you (proves where checks for nil need not go, and puts them
everywhere else) would be the best way and then port the code of the
compiler to that system.  By language upgrade, I also would include a
pure library solution to manage the complexity.

> I can only see one good thing they help with: suppression of
> cascading errors.  I can't believe it's too hard to find another way
> of solving that.

It isn't.  error_mark_node does that.  :-) If you can offer a
refinement on the system that appeals to the eye and doesn't kill
compiler performance and preserves the non-cascading nature of
error_mark_node, we are all ears.

             reply	other threads:[~2001-11-24  1:42 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-14 12:01 mike stump [this message]
2001-11-14 14:57 ` Neil Booth
2001-11-14 16:35   ` Gabriel Dos Reis
2001-11-15  9:00   ` Mark Mitchell
2001-11-25  0:41     ` Mark Mitchell
  -- strict thread matches above, loose matches on Subject: below --
2001-11-17 17:09 mike stump
2001-11-17 20:34 ` Per Bothner
2001-11-26 14:58   ` Per Bothner
2001-11-26 14:51 ` mike stump
2001-11-17 11:46 Richard Kenner
2001-11-26 13:36 ` Richard Kenner
2001-11-17 11:23 mike stump
2001-11-26 13:29 ` mike stump
2001-11-17 11:19 mike stump
2001-11-26 12:54 ` mike stump
2001-11-16  9:26 Richard Kenner
2001-11-26  3:15 ` Richard Kenner
2001-11-15 23:55 Richard Kenner
2001-11-25 17:22 ` Richard Kenner
2001-11-15 20:12 Richard Kenner
2001-11-15 20:19 ` Per Bothner
2001-11-25 16:48   ` Per Bothner
2001-11-25 16:24 ` Richard Kenner
2001-11-15 17:44 Richard Kenner
2001-11-15 19:52 ` Per Bothner
2001-11-25 16:13   ` Per Bothner
2001-11-25 15:01 ` Richard Kenner
2001-11-15 17:25 Richard Kenner
2001-11-15 17:39 ` Per Bothner
2001-11-25 14:50   ` Per Bothner
2001-11-25 14:37 ` Richard Kenner
2001-11-15 16:24 Richard Kenner
2001-11-15 17:08 ` Per Bothner
2001-11-25 14:33   ` Per Bothner
2001-11-25 13:44 ` Richard Kenner
2001-11-15 14:19 Richard Kenner
2001-11-25  6:42 ` Richard Kenner
2001-11-15 13:20 Richard Kenner
2001-11-15 13:20 ` Neil Booth
2001-11-25  6:34   ` Neil Booth
2001-11-16  8:52 ` Richard Henderson
2001-11-25 23:22   ` Richard Henderson
2001-11-25  6:29 ` Richard Kenner
2001-11-15 12:28 Richard Kenner
2001-11-15 12:44 ` Neil Booth
2001-11-25  5:33   ` Neil Booth
2001-11-25  5:25 ` Richard Kenner
2001-11-15 11:05 Richard Kenner
2001-11-15 12:07 ` Neil Booth
2001-11-25  5:23   ` Neil Booth
2001-11-15 14:55 ` Per Bothner
2001-11-25 10:27   ` Per Bothner
2001-11-25  5:13 ` Richard Kenner
2001-11-15 10:14 Richard Kenner
2001-11-15 10:36 ` Neil Booth
2001-11-25  5:06   ` Neil Booth
2001-11-25  4:23 ` Richard Kenner
2001-11-15  8:15 mike stump
2001-11-15  8:43 ` Zack Weinberg
2001-11-24 23:06   ` Zack Weinberg
2001-11-15  8:02 mike stump
2001-11-15  9:51 ` Neil Booth
2001-11-25  4:02   ` Neil Booth
2001-11-13 16:47 dewar
2001-11-13  6:18 Craig Rodrigues
2001-11-13  8:25 ` Gerald Pfeifer
2001-11-13  8:39   ` Craig Rodrigues
2001-11-13  8:40     ` Gerald Pfeifer
2001-11-13 14:52       ` Gerald Pfeifer
2001-11-13 16:41       ` Zack Weinberg
2001-11-13 16:55         ` Neil Booth
2001-11-13 18:07           ` Gabriel Dos Reis
2001-11-13 18:09             ` Neil Booth
2001-11-14  9:46               ` Zack Weinberg
2001-11-14 10:02                 ` Neil Booth
2001-11-14 10:06                   ` Joseph S. Myers
2001-11-14 10:10                     ` Neil Booth
2001-11-14 10:19                       ` Joseph S. Myers
2001-11-14 14:16                       ` Gabriel Dos Reis
2001-11-14 17:34                       ` Michal Moskal
2001-11-14 13:55                   ` Gabriel Dos Reis
2001-11-14 15:00                     ` Neil Booth
2001-11-14 16:50                       ` Gabriel Dos Reis
2001-11-14 12:43                 ` Phil Edwards
2001-11-15  0:55               ` Mark Mitchell
2001-11-15  1:22                 ` Gabriel Dos Reis
2001-11-15  1:44                   ` Neil Booth
2001-11-15  4:55                     ` Zack Weinberg
2001-11-15  5:19                       ` Joseph S. Myers
2001-11-15  6:58                         ` Zack Weinberg
2001-11-15  9:07                       ` Mark Mitchell
2001-11-17  9:40                         ` Zack Weinberg
2001-11-17  9:56                           ` Mark Mitchell
2001-11-18  4:44                             ` Zack Weinberg
2001-11-26 16:45                               ` Zack Weinberg
2001-11-26 11:55                             ` Mark Mitchell
2001-11-26 11:46                           ` Zack Weinberg
2001-11-25  0:42                         ` Mark Mitchell
2001-11-15  9:23                       ` Neil Booth
2001-11-17 10:37                         ` Zack Weinberg
2001-11-17 10:54                           ` Neil Booth
2001-11-26 12:25                             ` Neil Booth
2001-11-26 12:07                           ` Zack Weinberg
2001-11-25  3:50                         ` Neil Booth
2001-11-15  5:14                     ` Mark Mitchell
2001-11-16  6:27                     ` Fergus Henderson
2001-11-16  8:32                       ` Daniel Berlin
2001-11-25 22:49                         ` Daniel Berlin
2001-11-25 22:06                       ` Fergus Henderson
2001-11-15  3:02                   ` Zack Weinberg
2001-11-16  4:04               ` Fergus Henderson
2001-11-25 21:58                 ` Fergus Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200111240140.RAA08504@kankakee.wrs.com \
    --to=mrs@windriver.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdr@codesourcery.com \
    --cc=neil@daikokuya.demon.co.uk \
    --cc=pfeifer@dbai.tuwien.ac.at \
    --cc=rodrigc@mediaone.net \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).