GCC 13 has some new features...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,809
Reaction score
10,376
Credits
97,674
This is well above my pay grade. Asking me in-depth questions about this would be futile.

 


It looks like all the things that were asked for were done to port even more C code to C++. LOL none of the C programs that used NULL for at least 10 years will change to "nullptr" unless a company has to do it to avoid bankruptcy. That is, if they do use C instead of C++.

Under "Enhanced Enumerations" in the article, something was said which caused some people, like me, to consider Freebasic less often for a PPA or other project. One was the redefinition of "Integer" type. The authors of Freebasic decided to go even further away from compatibility with QuickBASIC, since the latter (and QB64) always indicated "Integer" as 16-bit. On 32-bit Freebasic, however, "Integer" is 32-bits if I'm not mistaken, and on 64-bit it's 64-bits. Some old QuickBASIC/QBasic programs might not be affected about it, since the old products never supported pointers like in C and Freebasic. But some of the oldest Freebasic code will have to be modified which assumes through a pointer that "Integer" is two bytes, instead of consulting the compiler about it. Anyway, some programmers avoid a generic type name like "Integer" to precisely indicate what is the size of integer they are declaring. There is no choice in QB64 ("_Byte" for 8-bit, "Long" for 32-bit, "_Integer64" for 64-bit, and there is also the "_Unsigned" attribute).

"auto" is something begged for by lazy programmers for a long time, which Freebasic has had, for example. It will make programs harder to read.

LOL now C has "true" and "false" as keywords while BASIC, which is supposed to be more readable, will never have them! In Freebasic they are predefined constants. IINM they could be overriden but it will have to be before global constructor call and other setup. It would have been impossible if "true" and "false" were keywords instead.

It looks like the "attribute" definitions haven't been enough to save programmers extra typing, that's why "noreturn" exists but must have any delimeters around it. LOL. The "unreachable()" thing is more evidence that lazy programmers win and more C code than ever will be written by something like ChatGPT.

Everything else in the article is weird. I'm not a professional programmer. The article's conclusion says it all. I only wanted to point out a few things that interested me about the new "gcc" release.
 

Staff online

Members online


Top