gracicot, to cpp
@gracicot@mastodon.social avatar

Yay!! Again, some compiler decided to change template conversion operator rules.

And again, compilers won't agree with what the standard says or with each other since changing the rules may break users, even though they keep doing it (even in minor versions!) 🤦

#cpp #cplusplus #msvc #clang #gcc

rml, to rust
@rml@functional.cafe avatar

size: 343Mb*
size: 1Gb
size: 1.4Gb
size: 1.7Gb

size: 5mb

[ * ] all based on the results of using size, removing common and documentation-based dependencies such as ncurses, bash, and zlib

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 .

graywolf, to random
@graywolf@emacs.ch avatar

Is there anything wrong with this #c code (I am compiling with #gcc 13.2.1)?

int
stravis(char **outp, const char *src, int flag)
{
char *buf;
int len, serrno;

buf = calloc(4, strlen(src) + 1);
if (buf == NULL)
return -1;
len = strvis(buf, src, flag);
serrno = errno;
*outp = realloc(buf, len + 1);
if (*outp == NULL) {
*outp = buf;
errno = serrno;
}
return (len);
}

I am getting #useafterfree warning:

/home/build/repo/compat_vis.c: In function ‘stravis’:
/home/build/repo/compat_vis.c:222:23: warning: pointer ‘buf_15’ may be used after ‘realloc’ [-Wuse-after-free]
222 | *outp = buf;
| ~~~~~~^~~~~
/home/build/repo/compat_vis.c:220:17: note: call to ‘realloc’ here
220 | *outp = realloc(buf, len + 1);
| ^~~~~~~~~~~~~~~~~~~~~

I do not understand why, the code looks correct... What am I missing?

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

ccgargantua, to programming

When moving to a compiler like from and , what speed pitfalls should I be aware of that optimizations in those compilers typically hold our hand with, but tcc does not?

Any input would be great!

#c

abcdw, to random
@abcdw@fosstodon.org avatar

#gcc fun

trofi, to random
@trofi@fosstodon.org avatar

Today's gcc bug is a gcc compilation performance problem:
https://gcc.gnu.org/PR111619

Final gcc is compiled with -O2 by default (intended) and booter gcc is compiled with -O0 (also intended).

But unoptimized gcc is very inefficient at handling huge generated files like insn-recog.cc.

#gcc #bug

abcdw, to llvm
@abcdw@fosstodon.org avatar

I have half an hour trip to climbing gym and back 3 times a week. Not to waste this time I take my laptop with downloaded materials with me and watch courses.

Previously it was OCaml course, now it is Advanced Compilers course:
https://www.cs.cornell.edu/courses/cs6120/2023fa/self-guided/

#llvm #gcc #compilers #scheme #racket #guile #lisp #clojure

csepp, to til

that could have been merged into under a license.
Tbh everyone who is serious about / should learn from the fatal mistake that was the anti-modular-GCC stance of RMS, lest history be repeated.
https://www.phoronix.com/news/MTU4MzE
via: https://news.ycombinator.com/item?id=26535789

bluedevil, to stackoverflow

New vulnerability exposed on GCC. @Azeria and Tom Hebb, has discovered a brand new 0-day in GCC. On GCC's AArch64 version, stack protection doesn't detect overflows of dynamically-sized local variables. Vulnerability fixed! But there are a lot of binaries in the wild which has this vulnerability.

https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf

https://rtx.meta.security/mitigation/2023/09/12/CVE-2023-4039.html

#0-day #gcc #vulnerability #stackoverflow #smashthestack

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

unixbhaskar, to linux
@unixbhaskar@fosstodon.org avatar
jperkin, to random
@jperkin@federate.me.uk avatar

Compiler folks!

Let's say I'm using _Float16 on a system which doesn't support FP16.

If I compile it directly to a program then libgcc does its thing and __extendhfdf2 etc is pulled in transparently. All good.

If I compile it as a shared library, it is not, and I have to add -lgcc manually to avoid undefined symbols.

Is this expected behaviour? If not, where should I start looking?

Thanks!

#gcc

cstrotm, to random
@cstrotm@mastodon.social avatar
brohee, to random
@brohee@pouet.chapril.org avatar

Extremely impressed by #GCC 14.1 static analysis (-fanalyzer). Not only really finding real bugs but enough information to convince oneself of the reality of the issue. A bit frightening on an old codebase.

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 #gcc #clang #memorysafety

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.

#illumos #gcc #go

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

En el episodio de hoy de , 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

Wild_Rose, to gamedev

Oh, wtf? I have never had gcc act like clippy before. #gamedev #gcc

boilingsteam, to linux
@boilingsteam@mastodon.cloud avatar
gnutools, to linux
@gnutools@fosstodon.org avatar

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

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

#cpp #gcc #bug

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

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