109 subscribers
34 photos
35 links
How to code?
@Lazymio
Download Telegram
https://stackoverflow.com/questions/50605/signed-to-unsigned-conversion-in-c-is-it-always-safe

本身不算什么新鲜的事情,但是真正有趣的是只有g++报了这个warning
~ > cat /tmp/test.c
#include "stdio.h"
#include "stdlib.h"
inline int test(){
return 1;
}

int main(){
if (test()) {
printf("test\n");
}
}
~ > gcc /tmp/test.c -o /tmp/test
/usr/bin/ld: /tmp/ccwgqM5z.o: in function `main':
test.c:(.text+0xe): undefined reference to `test'
collect2: error: ld returned 1 exit status



这就是C语言吗.jpg

Explanation
To incoming English speakers: I don't plan to release any English contents in this channel though you might find equivelant posts in my English blog: https://blog.lazym.io. I appreciate your interests in my channel.
How2Code pinned «To incoming English speakers: I don't plan to release any English contents in this channel though you might find equivelant posts in my English blog: https://blog.lazym.io. I appreciate your interests in my channel.»
Forwarded from Lazymio
dockerd/containerd-shim-runc-v2 这两个进程占用大量CPU有人有经验吗,我就起了一个container占用1个核心,这俩进程直接吃了大概8个核心
Forwarded from Lazymio
搜不到啥信息
Forwarded from Lazymio
哦我艹 是因为程序输出到stdout/stderr的垃圾太多了
Forwarded from Lazymio
一个小时喷了500G的垃圾数据
Forwarded from Lazymio
还好磁盘满了提醒我了,不然感觉要检查更久了(
Forwarded from Lazymio
今天学习到一个神奇的概念,谜底放在最后

这段代码 为什么 name 可以返回一个 stack 上的 Cow 对象

谜底: Const Promotion