Look what I found
-
Look what I found
@error yes -
Look what I found
@error this is devious and i love it -
Look what I found
@error musl does this in its printf implementation: https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.c#n597
-
Look what I found
@error wow it does not even -Wextra the nested labels
-
switches are just polyamorous gotos
@gloriouscow @error the important part is the boundaries tbh
-
Look what I found
-
you can find more here:
https://hachyderm.io/search?q=%22Cursed+code+of+the+day%22&type=statuses
-
@mikee I actually tried it. It works just fine to my surprise. But the clangd formatter gone mad:
-
Three lines too many. I thought serious programmers were lazy.
@KingmaYpe @error I think this one falls under increasing job security by writing code nobody else understands how to work with
-
Look what I found
@error this will infest my nightmares.
-
@shafik WHATDA...
Hm -
@error musl does this in its printf implementation: https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.c#n597
@koorogi so, in case 'm', we just skip the first line of the next case and go straight to the line 600. Ok
Without {} it reads easier, I'd say
-
-
Look what I found
@error The “break;” are not necessary in this example. https://gcc.godbolt.org/z/GTenx1bPz
-
Look what I found
@error This might actually lead to a physical altercation.
-
Look what I found
@error this is actually amazing.
-
Look what I found
@error This is cursed.
-
R AodeRelay shared this topic