Looks like it's always been that way as far as I can tell. We're just bad at C lol
-
-
No, like, I remember specific warnings about how this doesn't work. But they were from 2002, so maybe it changed?
1 reply 0 retweets 0 likes -
Hm. But setting gcc standards mode as far back as c90 doesn't change the behavior. Okay, I'm just wrong.
1 reply 0 retweets 0 likes -
Replying to @codefolio @schneems
A more reasonable explanation is that you have shifted from an alternate reality where that was true.
2 replies 0 retweets 0 likes -
Replying to @sgrif @codefolio
We have a winner https://www.reddit.com/r/C_Programming/comments/6p8smu/help_with_an_rpc_example/dknico9/ …
1 reply 0 retweets 1 like -
Replying to @schneems
FYI I think the reason you got a segfault when you assigned it to a string literal is that it's not writable memory
1 reply 0 retweets 0 likes -
(Assuming something in that call tries to mutate it)
1 reply 0 retweets 0 likes -
Replying to @sgrif
Yes, I think that's it. Makes sense in hindsight. Frustrating that's not more clear, at least mentioned in the docs.
1 reply 0 retweets 0 likes -
Replying to @schneems
Yeah, it's unfortunate that in C `*const T < *T` and not the other way around
1 reply 0 retweets 0 likes -
Replying to @sgrif
I don't understand this statement.
1 reply 0 retweets 0 likes
A const pointer is a "subclass" of a mutable pointer when it should be the opposite. Mutability adds capability
-
-
Replying to @sgrif
Thanks, that makes sense.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.