kernellogger, (edited ) to random
@kernellogger@fosstodon.org avatar

New C++ features in #GCC 14; @strudlzrout writes:

"'C++26 features

  • Trivial infinite loops and UB
  • Static storage for braced initializers
    […]

C++23 features

  • Deducing this
  • References in constant expressions
    […]

Defect report resolutions

  • stricter constinit
  • goto and trivially-initialized objects
    […]

Additional updates

  • More checking in templates
  • In-class variable template partial specializations
    […]

New and improved warnings

  • -Wnrvo added
    […]"'

https://developers.redhat.com/articles/2024/05/15/new-c-features-gcc-14

gnutools, to linux
@gnutools@fosstodon.org avatar

Exploring #GCC extensions in the #Linux kernel and what does -std=gnu11 mean anyways!
https://maskray.me/blog/2024-05-12-exploring-gnu-extensions-in-linux-kernel

boilingsteam, to linux
@boilingsteam@mastodon.cloud avatar
smurthys, to cpp
@smurthys@hachyderm.io avatar

I spent ~hour yesterday fighting an issue with my C++ code, only to later figure out it's a possible GCC bug, because Clang accepts the same code.

The issue is that GCC does not permit a constrained type parameter in a template template parameter of an aliased template. See the simplified code with the issue.

A cursory search of GCC Bugzilla does not readily show any related bug. I'll look carefully but lemme know if this is a known bug (probably is). 🙏🏽

https://sigcpp.godbolt.org/z/bGTnM3v1q

benalb, to random
@benalb@mastodon.bofhers.es avatar

En el episodio de hoy de #yavosotrosque , abro mi VM con windows10, porque es sábado y tengo el cuerpo para full-contact y microsoft me dice que para que no me vuelva a congelar mis ficheros en OneDrive que borre, o compre más capacidad...

Tengo 0.1% ocupado. Creo que tengo un fichero de texto, o dos.

¿Qué tal vuestro día?

visone,
@visone@fosstodon.org avatar

@benalb
Actualize la toolchain con gcc14rc-20240503 y consegui que no reventara todo el systema......
Ahora toca la otra maquina...xdddd

plink, to Palestine
@plink@mastodon.online avatar
EndemicEarthling,
@EndemicEarthling@todon.eu avatar

@plink @palestine @israel Having now skimmed through dozens of updates on that link, 1,000s of words, the fact that conducted an illegal act of war against a civilian building on Iranian soil that killed 16 people recently is never mentioned, with the missile strike on is only vaguely mentioned 3 times. It is never labelled an 'unprecedented escalation', despite that being just as true as the latest development.

Also not mentioned by the is the fact that the 1st April Israeli strike was widely condemned as yet another breach of international law —by the , the , the , the , the and dozens of national governments—but was not condemned by the US government.

Also not mentioned at all the highly pertinent fact that Israel (and its primary backer and weapons supplier the ) has spent six months committing atrocities against millions of civilians in , with more children, more journalists, more healthcare workers, more humanitarian aid workers, and more UN employees violently killed than in any other conflict since at least the Rwandan genocide (and in some cases going back to WWII). Israel is responsible for the most rapid deterioration of the nutritional status of a civilian population since WWII.

NYT sucks.

Share better news sources?

fsf, to emacs
@fsf@hostux.social avatar

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Benjamin Woodruff, Jeffrey Bencteux, John Muhl, Matheus Branco Borella, Sergey Alexandrovich Bugaev, and Wang Diancheng for assigning their copyright to the FSF! , , , , , , , , and more: https://u.fsf.org/3ht

mattst88, to random
@mattst88@fosstodon.org avatar

Weird debugging mystery. On an ARM system, I saw a few packages failing to build with a strange error:

> 1 {standard input}: Assembler messages:
> 1285 {standard input}:3629: Error: garbage following instruction -- `vmov.f64 d0,#6.:e+0'

I started seeing this after updating the system, which also updated gcc. I suspected a gcc regression, so I filed https://bugs.gentoo.org/923154 in Gentoo's bugzilla.

I found that the previous version of gcc didn't have this problem. Should be able to bisect..

mattst88,
@mattst88@fosstodon.org avatar

I also tried and couldn't reproduce the failure in a 32-bit chroot on 's development machine, so I was stuck doing all the debugging (and loooooong builds) on my very slow single-core 800MHz Solid Run .

Diff'ing the assembly output between the working and non-working gcc versions I saw:

> - vmov.f64 d0, #6.:e+0
> + vmov.f64 d0, #7.0e+0

Naturally, binutils' assembler fails to recognize "6.:e+0" as a floating-point constant. Where is the ":" coming from?

RogerBidon, to c64 French
@RogerBidon@mastodon.online avatar

Hey I heard you'd love a decent C compiler for the 6502 but feared compiling GCC ...

Problem resolved, here's a binary release of gcc-6502: https://github.com/sgadrat/gcc-6502-bits/releases/tag/v8.4.1-2

(If someone feels brave, a Windows build would make for an awesome PR ☺️ )

https://github.com/sgadrat/gcc-6502-bits/releases/tag/v8.4.1-2

#nesdev #c64

zirias,
@zirias@techhub.social avatar

@RogerBidon serious question, assuming you have to write mostly "targeted" code anyways (because a just won't reasonably run 98% of today's existing C code), what's the edge of a targeting this platform over e.g. ?

If there's a real advantage, I might be tempted to bring this to ...

thelastpsion, to neovim
@thelastpsion@bitbang.social avatar

Thoughts on 3 months of usage (in ):

  • Easy to pick up and read
  • Good libraries
  • Generics
  • No closures
  • Binaries aren't small
  • LSP (pasls) isn't complete, but better than nothing; + really help
  • Docs are frustrating
  • Good forums/community
  • Targets SO MANY platforms (, 32-bit , , , )! More than Rust, Go
  • A lot of historic books and projects

Would I use again? Absolutely yes, without doubt.

tetrislife,

@thelastpsion cool! I haven't used it much instead of C++ but it is great that it doesn't depend on a complicated compiler like #GCC or #LLVM and still does quite well.

kernellogger, to random
@kernellogger@fosstodon.org avatar

"'"[…] for #GCC 14 I've implemented new warning: -Wanalyzer-infinite-loop that's able to detect some simple cases of infinite loops. […]

"[…] added the ability for the analyzer to emit text-based diagrams visualizing the spatial relationships in a predicted buffer overflow […]

[…] better tracking C string operations […]

[…] form of "taint analysis" […] I enabled this by default when -fanalyzer is selected. This also enables these 6 taint-based warnings […]"'"

https://developers.redhat.com/articles/2024/04/03/improvements-static-analysis-gcc-14-compiler#

philpem, to random
@philpem@digipres.club avatar

Learning about the gcc attribute ((ifunc ("resolve_xxx"))) construct is making me wonder what the hell the person who thought it up was drinking, smoking or eating, and the code review team too.

I'm struggling to think of a reasonable usecase for this monstrosity of a construct.

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-ifunc-function-attribute

#cve20243094 #gcc #whatwereyouthinking

ekaitz_zarraga, to random
@ekaitz_zarraga@mastodon.social avatar

So some text about the #gcc RISC-V backport now with C++ support!

Still not a very good Guix package though! But @efraim is helping a lot and we'll soon have something working very well.

https://ekaitz.elenq.tech/bootstrapGcc10.html

hankg, to history

In the 1990s I used DJGPP to run a small C-based Unix tool I wrote on a DOS machine. Later years Cygwin was more the way I would do cross-platform GCC stuff. I now have even more appreciation for what they needed to do behind the scenes to get DJGPP working. #gcc #djgpp #history #ComputerHistory #RetroComputing
Running GNU on DOS with DJGPP

fsf, to emacs
@fsf@hostux.social avatar

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Gene Goykhman, Sergey Alexandrovich Bugaev, Wang Diancheng, Warren Thomas Everett Wilkinson, and Xinyuan Zhang for assigning their copyright to the FSF! Learn more at https://u.fsf.org/3ht

withoutclass, to gentoo
@withoutclass@mastodon.sdf.org avatar

Sigh, on one of my two machines, the upgrade to profile 23 is having trouble on the install phase of .

fsf, to emacs
@fsf@hostux.social avatar

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Gene Goykhman, Sergey Alexandrovich Bugaev, Wang Diancheng, Warren Thomas Everett Wilkinson, and Xinyuan Zhang for assigning their copyright to the FSF! Learn more at https://u.fsf.org/3ht

gnutools, to random
@gnutools@fosstodon.org avatar
fsf, to emacs
@fsf@hostux.social avatar

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Benjamin Woodruff, Jeffrey Bencteux, John Muhl, Matheus Branco Borella, Sergey Alexandrovich Bugaev, and Wang Diancheng for assigning their copyright to the FSF! , , , , , , , , and more: https://u.fsf.org/3ht

jperkin, to random
@jperkin@federate.me.uk avatar

Speaking of GCC, does anyone know of any lawful impediment why I may not drop gccgo from my GCC packages?

Feels like something that hasn't been necessary since 2013.

retropolis, to VintageOSes Portuguese
@retropolis@bitbang.social avatar
mattst88, to random
@mattst88@fosstodon.org avatar

I'm trying to fix a patch to allow #pixman's #ARM #NEON #assembly code to build with clang. They perform a lot of mechanical changes to switch to the "unified" ARM assembly syntax (.syntax unified), supported by both #gcc and #clang.

With clang the code builds but fails 3 of the tests in the test suite with what appear to be unaligned accesses. With gcc, the test suite passes before and after the patches.

I've muddled through as much debugging as I can. Any ideas? https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/78#note_2078065

fsf, to emacs
@fsf@hostux.social avatar

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Benjamin Woodruff, Jeffrey Bencteux, John Muhl, Matheus Branco Borella, Sergey Alexandrovich Bugaev, and Wang Diancheng for assigning their copyright to the FSF! , , , , , , , , and more: https://u.fsf.org/3ht

jbzfn, to random
@jbzfn@mastodon.social avatar

🔐 C can be memory-safe
— Robert Graham

"Modern C compilers already have the ability to be memory-safe, we just need to make minor -- and compatible -- changes to turn it on. Instead of a hard-fork that abandons legacy system, this would be a soft-fork that enables memory-safety for new systems."

https://blog.erratasec.com/2023/02/c-can-be-memory-safe.html

#c

fsf, to emacs
@fsf@hostux.social avatar

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Axel Stenkil Forsman, Huan Thieu Nguyen, Jinyi Xian, and waffl3x for assigning their copyright to the FSF! #GNU #Emacs #GCC Learn more at https://u.fsf.org/3ht #CopyrightAssignments

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • khanakhh
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • everett
  • Durango
  • kavyap
  • megavids
  • ethstaker
  • tacticalgear
  • cisconetworking
  • modclub
  • cubers
  • osvaldo12
  • vwfavf
  • GTA5RPClips
  • normalnudes
  • anitta
  • tester
  • Leos
  • JUstTest
  • All magazines