Santa Claus <santa@northpole.com> schrieb:
> I'm starting to get the xcode bus error yet again
>
[quoted text clipped - 5 lines]
>
> the needed settings are in the project file so it should be compiled as-is
Why do you have these ";" in the function head and after the closing bracket.
You are the first person I see coding this way. I think that is wrong. I don't
know if that can cause your error. For me and my powerbook it is nearly
impossible to handle yasse.m it is to big. Every action takes minutes.
Florian
Patrick Machielse - 26 Dec 2006 12:00 GMT
> Santa Claus <santa@northpole.com> schrieb:
>
[quoted text clipped - 7 lines]
> know if that can cause your error. For me and my powerbook it is nearly
> impossible to handle yasse.m it is to big. Every action takes minutes.
I can only agree. The first compiler error is in a 900 (!) line method,
containing around 200 nested if statements (maybe this exceeds some
internal compiler limit?). Don't program like this!
Really, there is no reason to have a 34k line .m file. Either it should
be split up, or/and the code should be written more compact (I'm
thinking of the initialization routines; Santa, please use a loop when
you are adding 100 items to an array, don't write it all out...)
On a side note: I too hate that 'cc1obj has crashed' message. That
really shouldn't happen, and it really shouldn't happen that regularly.
Bad Apple :-(
patrick
Santa Claus - 27 Dec 2006 01:55 GMT
>> I can only agree. The first compiler error is in a 900 (!) line method,
> containing around 200 nested if statements (maybe this exceeds some
> internal compiler limit?). Don't program like this!
oops, forgot to comment on this...
i was also considering switching from that many if statements into a
case statement.
considering the fact that ALMOST everything needs to be included in one file,
the choices on what to eliminate into a separate class gets limited.
Michael Ash - 27 Dec 2006 03:40 GMT
> considering the fact that ALMOST everything needs to be included in one file,
> the choices on what to eliminate into a separate class gets limited.
Um, what? Why does "ALMOST everything" need to be in the same file? I've
shipped serious apps which contained no source file that broke 2,000
lines.

Signature
Michael Ash
Rogue Amoeba Software
Santa Claus - 27 Dec 2006 01:55 GMT
> Really, there is no reason to have a 34k line .m file. Either it should
> be split up, or/and the code should be written more compact (I'm
[quoted text clipped - 6 lines]
>
> patrick
actually, the program WAS around 50k lines long and compiles flawlessly. it
wasn't until i started to modularize what could be modularized when things started
going wrong.
Michael Ash - 26 Dec 2006 16:13 GMT
> Santa Claus <santa@northpole.com> schrieb:
>
[quoted text clipped - 12 lines]
> You are the first person I see coding this way. I think that is wrong. I don't
> know if that can cause your error.
While it's strange and probably bad style, there's nothing wrong with it.
Putting a semicolon where you don't need one normally results in a nop.
This is not true if the semicolon is between two things that are supposed
to be related, but putting one at the end of a function is fine. If you
put ";;;;;;;;;;" in between two functions it will compile without a
problem.
Incidentally, my entry in the 2005 IOCCC took advantage of this property
to build a combined C/Lisp program, as ; is the Lisp comment character.
Most of my semicolons terminated statements as you'd expect, but the first
character in the file was a semicolon, as that was the only safe way to
start the file in both languages.
Of course, "used in a winning IOCCC entry" is not exactly a resounding
endorsement of style.

Signature
Michael Ash
Rogue Amoeba Software
Florian Zschocke - 26 Dec 2006 17:01 GMT
Michael Ash <mike@mikeash.com> schrieb:
> While it's strange and probably bad style, there's nothing wrong with it.
> Putting a semicolon where you don't need one normally results in a nop.
> This is not true if the semicolon is between two things that are supposed
> to be related, but putting one at the end of a function is fine. If you
> put ";;;;;;;;;;" in between two functions it will compile without a
> problem.
What is about the size? I there a limit? Can a compiled object grow endless?
Florian
Michael Ash - 26 Dec 2006 17:31 GMT
> Michael Ash <mike@mikeash.com> schrieb:
>
[quoted text clipped - 6 lines]
>>
> What is about the size? I there a limit? Can a compiled object grow endless?
In theory there should be no limit, in practice... well, you'll eventually
run out of memory if nothing else.
However, it is not too uncommon to run into multi-megabyte source files.
Aside from horrible programmers who don't understand the benefits of
modularization, there are also some situations where very large
machine-generated source files are compiled. I doubt the massive size by
itself would cause anything here, but it's probably a contributing factor
in getting a crash instead of a sensible error. In my experience gcc will
happily crash if you confuse it enough, so that part isn't too remarkable.

Signature
Michael Ash
Rogue Amoeba Software