g++ sucks: internal compiler error???

C

Claudio Puviani

Jonathan Turkanis said:
I just read your post again. I didn't make up ICE -- it's an
accepted abbreviation. See, e.g.,
http://lists.boost.org/MailArchives/boost/msg50047.php

Um... well, you're just showing me another usenet posting. On usenet
postings, I've seen things like "axe" instead "ask", "your" instead or
"you're" (and vice versa), people calling VAX systems "supercomputers" or
"mainframes" and the list goes on.

As far as computer dictionaries and long-standing common practice go, "ICE"
just doesn't mean "internal compiler error".

But it was clear from the context what you meant, once I reread the sentence
not mentally substituting "in-circuit emulator". :)

Claudio Puviani
 
J

Jonathan Turkanis

Claudio Puviani said:
Um... well, you're just showing me another usenet posting. On usenet
postings, I've seen things like "axe" instead "ask", "your" instead or
"you're" (and vice versa), people calling VAX systems "supercomputers" or
"mainframes" and the list goes on.

I don't want to get into an argument here.

I was giving an example to show that 'internal compiler error' is
*one* establied meaning of ICE. You can find lots more on Google:
http://www.google.com/search?q=ICE+"internal+compiler+error"

Lots of abbreviations have more than one meaning. E.g., PA means
'Peano Arithmetic' to logicians, 'Propositional Attitudes' to
philosophers and 'Pennsylvania' to the US Postal Service.

In my circles, ICE means 'internal compiler error', 'intergral
constant expression' and -- I almost forgot -- 'frozen water'.

Jonathan
 
A

Alf P. Steinbach

<off-topic>

* "Claudio Puviani said:
As far as computer dictionaries and long-standing common practice go, "ICE"
just doesn't mean "internal compiler error".

I don't know about the dictionaries but practice is that for programmers
"ICE" does mean "internal compiler error". Also the expression "the compiler
iced" means it crashed or reported an internal error. The g++ compiler team
generally reacts very fast to ICEs, which they provide an effortless way of
reporting; Microsoft, on the other hand, goes out of its way (with dis-info
and such) to make it near to impossible to figure out how to report ICEs, or
in general to report errors with any of their products except auto crash info.

</off-topic>
 
N

Neil Zanella

Jonathan Turkanis said:
I guess I wasn't very clear. I was just trying to make what I thought
was an obvious point, but might not be to someone who has never seen
an internal compiler error: the internal error, which is clearly a
problem with the compiler, usually goes away when an error is
corrected. The error can often be spotted by using a second or third
compiler. If the code turns out to be correct, there is usually a way
to rewrite the code so that the compiler will accept it.

I've never had an ICE on GCC that didn't represent a problem with my
code. VC6, on the other hand, gives me ICEs all the time with
perfectly correct code, even when I use the standard workarounds.

Jonathan

Well, I happened to recompile the code with the same compiler from
Red Hat 9 (and I am running on Fedora Core 1). Nevertheless, the
Red Hat 9 version appears to have some patches in its versioning
string. And on that computer, the code compiles fine. Now, I was
not able to reproduce the error in a smaller example (which,
when doing what appears to be exactly the same thing, does
not crash). I would love to share this compiler bug with
you all, but do you really want me to post 1000 lines of
code simply because I cannot reproduce a smaller file
that produces the same error???

I'm not sure that would be acceptable. When the errors
are not internal, usually, I am able to reproduce them
in smaller code snippets.

Thanks,

Neil
 
J

Jonathan Turkanis

Well, I happened to recompile the code with the same compiler from
Red Hat 9 (and I am running on Fedora Core 1). Nevertheless, the
Red Hat 9 version appears to have some patches in its versioning
string. And on that computer, the code compiles fine.

Unfortunately, that's not surprising. Very frustrating, though. I
know it may not be possible in your case, but it might be helpful to
try it on a completely different compiler. Intel, maybe?
Now, I was
not able to reproduce the error in a smaller example (which,
when doing what appears to be exactly the same thing, does
not crash). I would love to share this compiler bug with
you all, but do you really want me to post 1000 lines of
code simply because I cannot reproduce a smaller file
that produces the same error???

I know the feeling. I think I said somewhere in this thread that I've
never had an internal error in g++ that didn't turn out to reflect an
error in my code; with VC6 I often get internal errors from code which
use techniques which I know work in isolation -- putting them all
together causes the ICE. Often there is a large amount of code
involved.

It's a painful process, but I can usually find out what's casuing the
ICE by including headers one at a time. When I find the first header
that causes the error (and verify that none of its includes are
causing the problem) I comment everything out, then uncomment it
systematically until the error resurfaces. Often the error can be
corrected by replacing a small bit of code with code which has exactly
the same meaning but is phrased slightly differently. Occasionally it
has required a substantial redesign. Very rarely I have been unable to
get the compiler to accept any code which does what I want and have
had to abandon my plans.
I'm not sure that would be acceptable. When the errors
are not internal, usually, I am able to reproduce them
in smaller code snippets.

I'd say it's probably against newsgroup policy to post so much code,
but if it's really only 1000 lines, I can't think of anywhere better
than here. I'll look at; but I probably don't have the time or stamina
to track down the error. Someone else might -- perhaps someone who's
had the same problem in the past.

Sorry this thread got so far off track.

Jonathan
 
S

Steven T. Hatton

Jonathan said:
I know the feeling. I think I said somewhere in this thread that I've
never had an internal error in g++ that didn't turn out to reflect an
error in my code;

I have been using GCC for the past 7 years on a daily basis to compile my
own, and other people's code. I cannot count the number of problems I have
had due to a flaw in GCC, because counting begins with 1, and I thus have
no place to begin.
 
J

Jorge Rivera

I would love to share this compiler bug with
you all, but do you really want me to post 1000 lines of
code simply because I cannot reproduce a smaller file
that produces the same error???

Then I have to ask. Why did you post? Talk to somebody at work, home
or a bar...
I'm not sure that would be acceptable.

No it wouldn't be nice (I don't think it would be much worse than this
response, though :) ).

JLR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top