Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1368217 Posts in 64213 Topics- by 56155 Members - Latest Member: Filipe Ferreira

October 23, 2019, 02:09:11 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)What C codestyle/features are you using? C++98, C++11, C++17 or plain C?
Poll
Question: What C codestyle/features are you using? C++98, C++11, C++17 or plain C?
C++98 - 1 (7.7%)
C++11 - 2 (15.4%)
C++17 - 5 (38.5%)
C - 5 (38.5%)
Total Voters: 13

Pages: 1 [2]
Print
Author Topic: What C codestyle/features are you using? C++98, C++11, C++17 or plain C?  (Read 774 times)
Daid
Level 3
***



View Profile
« Reply #20 on: September 30, 2019, 05:46:42 AM »

found this: https://github.com/roger-dv/cpp20-coro-generator

seems it's time to start the transition to c++20
Because depending on an experimental feature that is implemented by a single compiler is a good idea?



As for compilers, I hope none of you have to support code that needs to run in both gcc and the armcc compiler. It's a bit of a mess with feature support, especially on C++11 for armcc.
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
fluffrabbit
Guest
« Reply #21 on: September 30, 2019, 06:12:25 AM »

Why can't you use the GCC cross-compilers?
Logged
nikodil
Level 0
*



View Profile
« Reply #22 on: September 30, 2019, 10:01:07 AM »

seems it's time to start the transition to c++20

Because depending on an experimental feature that is implemented by a single compiler is a good idea?

more like because by the time I've transitioned my custom code that does the same thing (but slower, buggier, and incomplete), it has become standard and supported by all major compilers

and also it's my personal project so I have the luxury of being able to pick and choose the tooling
Logged

Daid
Level 3
***



View Profile
« Reply #23 on: September 30, 2019, 10:20:29 AM »

Why can't you use the GCC cross-compilers?
I can, and I am. But the code is shared along multiple work projects, and some are using the Keil armcc compiler, because that's what they approved for medical projects... (you pay for it, so it must be better right?)

Fun things I found out:
- Compiler crashes if your code uses exceptions and you don't enable them in the compiler flags
- While it states c++11 compatibility, it has to footnote "none of the stl libraries are implemented", even std::initializer_list is missing...
- It happly links in multiple shared libraries containing the same symbols, even if those implementations vastly differ
- It's nested structure initialization parsing is incompatible with gcc. Both support only different syntax.


At least it's not trying to impersonate gcc, like clang is. Which defines __GNUC__, even if it isn't the GNUC compiler. Requiring checks like this: https://github.com/daid/SeriousProton2/blob/master/include/private/collision/box2d.h#L4
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
fluffrabbit
Guest
« Reply #24 on: September 30, 2019, 11:00:55 AM »

With that mission-critical standardization bureaucracy, I get it. Of course there is no STL. As for the other afflictions, it would seem like 8 years would be long enough to fix things, but what do I know?

Bear in mind Clang is only what it is because GCC went GPLv3 and Steve Jobs had to fix the situation.
Logged
Daid
Level 3
***



View Profile
« Reply #25 on: September 30, 2019, 12:32:58 PM »

Clang also exists because the people behind gcc are bat shit insane. "We shouldn't make the architecture more modular, because that makes it easier to make close source modules, even tough our license does not allow that"
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
fluffrabbit
Guest
« Reply #26 on: September 30, 2019, 02:38:32 PM »

That explains the spaghetti headers. Without the static linking exception, nobody would use it. But I think Clang uses GCC headers, or a version thereof. I'm not really sure. In any case, there are a lot more decent compiler options when C++ is not a requirement.
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic