Editing the ZDoom source code

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

IntergalacticWalrus wrote: A single OS and three architectures and you claim it's "just as much [portable] as GCC"?? Sorry but you don't seem to know much about GCC's range of arch/OS support. GCC supports over a dozen architectures as well as another dozen of Operating Systems, not to mention support for true embedded systems (ie. programs running without an actual OS under it). Nowadays, GCC is used pretty much everywhere else than Microsoft's systems, from embedded devices to MacOS X. In fact all current game console systems use GCC in their official SDKs (except for the XBox, of course :wink: ).
I have a few comments about that.

1. The most 'system dependent' part about a compiler is its target processor. Producing code for the same processor but for different OS's should normally be identical except for very system specific stuff (e.g. Windows' structured exception handling) but for the most part there shouldn't be any notable difference.
2. It's not surprising that anyone but Microsoft is using GCC. Simple reason: It doesn't cost anything! Quality isn't a consideration here. Microsoft already has a much better compiler in development so why bother with something like GCC.

The sad thing about GCC is that there was a time when this was the best compiler out there. However it seems that its developers have become lazy and didn't develop the crucial parts any further in it as opposed to MS who constantly improved VC++. Full standard compliance may be nice but frankly, most programmers will most likely never use this stuff. IMHO the C++ standard has already become too bloated.
User avatar
IntergalacticWalrus
Posts: 31
Joined: Mon Sep 01, 2003 2:02 pm
Location: E2M2, among the many UAC boxes

Post by IntergalacticWalrus »

Graf Zahl wrote:2. It's not surprising that anyone but Microsoft is using GCC. Simple reason: It doesn't cost anything! Quality isn't a consideration here. Microsoft already has a much better compiler in development so why bother with something like GCC.
There ARE other compilers out there. The fact that GCC doesn't cost a thing is definitely not the only reason why everyone uses it. I'm sure Apple has enough money to get a Codewarrior license for all of its programmers, yet GCC is the official Apple compiler nowadays.
Graf Zahl wrote:The sad thing about GCC is that there was a time when this was the best compiler out there. However it seems that its developers have become lazy and didn't develop the crucial parts any further in it as opposed to MS who constantly improved VC++. Full standard compliance may be nice but frankly, most programmers will most likely never use this stuff. IMHO the C++ standard has already become too bloated.
While I agree that the C++ standard is bloated, calling the GCC developpers "lazy" is just stupid. GCC is one of the most active projects of the Free Software world, mostly because they have tons of commercial supporters. And near-full C++ compliance helps portability, which is not something that should be ignored, that is unless you're called Microsoft.

Anyway I'm out of this flamewar.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

GCC has the most C99 features for me.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

IntergalacticWalrus wrote:There ARE other compilers out there. The fact that GCC doesn't cost a thing is definitely not the only reason why everyone uses it. I'm sure Apple has enough money to get a Codewarrior license for all of its programmers, yet GCC is the official Apple compiler nowadays.
Why pay for something that isn't really that good if you can get something else for free?
While I agree that the C++ standard is bloated, calling the GCC developpers "lazy" is just stupid. GCC is one of the most active projects of the Free Software world, mostly because they have tons of commercial supporters. And near-full C++ compliance helps portability, which is not something that should be ignored, that is unless you're called Microsoft.
You should fully read my post. I didn't say that GCC isn't developed anymore, I said they are not doing the necessary stuff to keep up with the rest of the compiler world. All the cool standards are really nice but in the end the only things that matter are code size and execution speed. And apparently not enough is done in that regard.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

Well, GCC 3.2 does seem to produce code that executes ZDoom nearly as fast as Visual C++. It's just a shame the executable it produces is so large.

And it seems my post about Microsoft's efforts to improve standards compliance has been ignored.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

IntergalacticWalrus wrote:GCC supports over a dozen architectures as well as another dozen of Operating Systems...
And only one of them is used by 90% of computer users worldwide.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

randy wrote:And it seems my post about Microsoft's efforts to improve standards compliance has been ignored.
of course, when you disprove an uninformed opinion of someone they ignore it and move on to the next thing they think is true.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Cyb wrote:
randy wrote:And it seems my post about Microsoft's efforts to improve standards compliance has been ignored.
of course, when you disprove an uninformed opinion of someone they ignore it and move on to the next thing they think is true.
Dude, that's RL's mantra!
User avatar
IntergalacticWalrus
Posts: 31
Joined: Mon Sep 01, 2003 2:02 pm
Location: E2M2, among the many UAC boxes

Post by IntergalacticWalrus »

randy wrote:Well, GCC 3.2 does seem to produce code that executes ZDoom nearly as fast as Visual C++. It's just a shame the executable it produces is so large.
I know you did debug symbol stripping, but have you tried compiling ZDoom with Os (ie. optimize for size)? On modern systems it's just as good as the other optimising options performance-wise, except under rare circonstances.
randy wrote:And it seems my post about Microsoft's efforts to improve standards compliance has been ignored.
No, I just said the GCC developpers focused more on standards compliance than other aspects. I wasn't doing any comparison after that post.
HotWax wrote:And only one of them is used by 90% of computer users worldwide.
So what? You're saying that other 10% should be ignored?
cyb wrote:of course, when you disprove an uninformed opinion of someone they ignore it and move on to the next thing they think is true.
So Randy proved me wrong and just because I did not mention it again means I "ignored" what he said. Great.
Graf Zahl wrote:You should fully read my post. I didn't say that GCC isn't developed anymore, I said they are not doing the necessary stuff to keep up with the rest of the compiler world. All the cool standards are really nice but in the end the only things that matter are code size and execution speed. And apparently not enough is done in that regard.
So you're saying standards don't matter? I'll ignore that. About code size, considering GCC is widely used on embedded systems by serious companies, the current code size produced is not really a significant issue. And as for execution speed, according to Randy ZDoom has pretty much the same speed under both compilers. The major problem with GCC these days is its compiling performance, but as for the rest I say GCC definitely does "the necessary stuff to keep up with the rest of the compiler world", or else companies wouldn't be using it, regardless of whether it's free or not.
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Microsoft Standards Support

Post by Jim »

Look, what makes code that is only compiled in MSVC incompatible is the fact that they allow code with syntax errors to compile just fine. GCC stresses conformance to the standard, in that code that does not strictly adhere to the standard causes compile-time errors. (This in addition to the obvious effort to support all of the features of the latest ISO standard). It is possible, but not advisable to much of the checking less strict.

The point is that code that compiles fine in GCC (without using any of the well-documented GCC extensions) will also compile under MSVC most of the time, while the reverse is not true. (It is even possible to explicitly disallow use of GCC extensions using a compiler option). Zdoom's code would be cleaner and more standards conformant if it were regularly tested on GCC.
Fredrik
Posts: 66
Joined: Tue Jul 15, 2003 4:05 pm
Contact:

Re: Microsoft Standards Support

Post by Fredrik »

Jim wrote:Look, what makes code that is only compiled in MSVC incompatible is the fact that they allow code with syntax errors to compile just fine.
Care to give examples? It was a long time since I got a syntax error (even by the ISO specs) to compile without a warning in MSVC :P
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

IntergalacticWalrus wrote:
HotWax wrote:And only one of them is used by 90% of computer users worldwide.
So what? You're saying that other 10% should be ignored?
I'm saying that 10% of the world's users shouldn't dictate the compiler or standards used by everybody else.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Microsoft Standards Support

Post by Graf Zahl »

Fredrik wrote:
Jim wrote:Look, what makes code that is only compiled in MSVC incompatible is the fact that they allow code with syntax errors to compile just fine.
Care to give examples? It was a long time since I got a syntax error (even by the ISO specs) to compile without a warning in MSVC :P

I found that MSVC has a much stricter syntax check. Many things that GCC treats as warnings are compile errors in MSVC. Furthermore I found that GCC outputs too many warnings on its standard setting. As a result the serious stuff gets lost in a shitload of useless messages. I never had this kind of problems in MSVC.
User avatar
Chris
Posts: 2979
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

Many things that GCC treats as warnings are compile errors in MSVC.
The -Werror option should be mandatory on anything compiled on GCC. :P
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

IntergalacticWalrus wrote:
randy wrote:Well, GCC 3.2 does seem to produce code that executes ZDoom nearly as fast as Visual C++. It's just a shame the executable it produces is so large.
I know you did debug symbol stripping, but have you tried compiling ZDoom with Os (ie. optimize for size)? On modern systems it's just as good as the other optimising options performance-wise, except under rare circonstances.
Heh. If it's still "too big" -- define big, as the Windows EXE is 1,6MB currently -- you can try using upx :) reduce to some 700KB, even making a test ZIP smaller.

BTW, Randy, I tried to compile ACC 1.30 for Linux and... it took a loooong time (I hit ^C before). Why? Because -O6 was turned on. Even on AXP2K+. I then re-tried with -O2 and it did. Just a note.
Locked

Return to “Editing (Archive)”