So cute, Rize’s birthday is on Valentine’s day!
There is one more intresting fact. If you use -O3
flag (for clang -O1
, -O2
, …) compiler performs tail recursion optimization and transforms the recursion into an infinite loop, so there is no stack overflow.
gcc -O0
.file "main.c"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
movl $0, %eax
call main
nop
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (GNU) 14.2.1 20250207"
.section .note.GNU-stack,"",@progbits
gcc -O3
.file "main.c"
.text
.section .text.startup,"ax",@progbits
.p2align 4
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
.p2align 1
.p2align 4
.p2align 3
.L2:
jmp .L2
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (GNU) 14.2.1 20250207"
.section .note.GNU-stack,"",@progbits
clang -O1
.text
.file "main.c"
.globl main # -- Begin function main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.0:
.p2align 4, 0x90
.LBB0_1: # =>This Inner Loop Header: Depth=1
jmp .LBB0_1
.Lfunc_end0:
.size main, .Lfunc_end0-main
.cfi_endproc
# -- End function
.ident "clang version 19.1.7"
.section ".note.GNU-stack","",@progbits
.addrsig
Every time I make a post on [email protected], I doubt whether it should be published here. Is that a good idea to cross-post ‘Daily Yuru Yuri’ here? Because then it will be filled with content from only one community.
By the way, this time I somehow caused a bug on the lemmy instance and when I clicked on the cross-post, two cross-posts were created and for a while I lost contact with ani.social. Maybe it’s because I filled the Alt text
with hyphens — for some reason they disappeared, and the text itself cut off.
Like that kind of png
Cottage on Island Near Nora, Sweden (by Jonas Loiske)
flickr