ahs3 has quit [Read error: Connection reset by peer]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Read error: Connection reset by peer]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
voltron has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
voltron has quit [Read error: Connection reset by peer]
voltron has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
Andre_H has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
<la_mettrie>
ahs3: can you do something about it?
<la_mettrie>
looking at GCC's assembly output for the most simple call to external code, there's three lines i don't understand. it seems to store the original address of the stack pointer and then it meddles something with argument registers after the CALL https://pastebin.com/raw/tDiQxYgV
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
voltron has quit [Ping timeout: 250 seconds]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<la_mettrie>
ahs3: can you do something about it?
zjason` is now known as zjason
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<jn>
la_mettrie: about ahs3's flickering connection?
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<la_mettrie>
yeah, moderators should kickban
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<gordonDrogon>
la_mettrie, I'm not sure just being a newb so-far, but I observe that even with the -m32 flag, your compile outputs sd and ld instructions which sort of implys 64-bit store/loads. If I compile it with my 32-bit runes, I see sw & lw instructions
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<la_mettrie>
-m32 flag doesn't work with riscv-gcc. i know the code i pasted is 64-bit, i didn't even try to make it 32-bit yet
<gordonDrogon>
ok, just a curiosity for me - I see what the compiler does, but I can't tell you why...
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<gordonDrogon>
easy to eliminate, just give it -O3 ;-)
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
Andre_H has quit [Quit: Leaving.]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
BOKALDO has quit [Quit: Leaving]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<la_mettrie>
ok, nice that you provided example flags
ahs3 has joined #riscv
<gordonDrogon>
been trying to work this out for a few days now, but I think I have the right runes to generate freestanding binarys now.
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Read error: Connection reset by peer]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
<jn>
ahs3: please fix your connection
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Read error: Connection reset by peer]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Read error: Connection reset by peer]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
Sofia has quit [Ping timeout: 276 seconds]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
BOKALDO has joined #riscv
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
djdelorie has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
Sofia has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
jacklsw has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
frost has quit [Ping timeout: 260 seconds]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<muurkha>
/ignore ahs3 joins quits
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
<jimwilson_>
la_mettrie, s0 is the frame pointer, optimization will eliminate it, main always returns 0 even if there is no return statement and a0 is the return value, optimization will eliminate the use of a5
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
<jimwilson_>
la_mettrie, -march=rv32i -mabi=ilp32 for 32-bit code, we have more than one type of 32-bit code so -m32 can't work
<jimwilson_>
should be main returns 0 if no return statement
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
djdelorie has joined #riscv
<la_mettrie>
so the calling code adds the "returning" 0 by itself? that's how it looks to me
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<jimwilson_>
ISO C standard says we have to add the return 0 if no return statement in main
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
<la_mettrie>
okay, i probably assumed that returning 0 is added to the code at the function's side
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
nvmd has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
Andre_H has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
mahmutov has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
<gordonDrogon>
jimwilson_, thanks for that - helps me understand a little more too.
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
freakazoid343 has joined #riscv
freakazoid333 has quit [Ping timeout: 260 seconds]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
freakazoid343 has quit [Ping timeout: 240 seconds]
ahs3 has quit [Remote host closed the connection]
freakazoid333 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
freakazoid343 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
freakazoid333 has quit [Ping timeout: 250 seconds]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
freakazoid343 has quit [Ping timeout: 260 seconds]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3 has joined #riscv
ahs3 has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
bauruine has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
jacklsw has quit [Quit: Back to the real life]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
<muurkha>
that fucking ahs3 evaded my /ignore by switching nicks
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
<muurkha>
adding returning of 0 when no return statement must be a new feature
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
<jrtc27>
no, main is special and always has been, there is an implicit return 0
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
<jrtc27>
it made more sense back in the K&R days
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
ahs3_ has joined #riscv
ahs3_ has quit [Remote host closed the connection]
<muurkha>
really? I had no idea, I thought you could get a program that inadvertently returned error statuses by omitting the return 0 (at least if you didn't declare main as void?)
<jrtc27>
remind me to remove that in 24h
<jrtc27>
(or someone else just do it :P)
<muurkha>
I have set a reminder to remind you
<jrtc27>
:D thanks
<muurkha>
I don't remember if I ever actually saw this behavior though
<muurkha>
or just assumed it because of the behavior of other functions
<jrtc27>
if you declare main as returning void it'll be unspecified
<jrtc27>
or anything "not compatible with int"
<muurkha>
aha, thanks for the correction
<jrtc27>
if compatible, you get "reaching the } that terminates the main function returns a value of 0"
<muurkha>
I think it would be perfectly reasonable to require compilers to insert an implicit return 0 wherever a function fails to return anything explicitly (and has a declared return type)
<muurkha>
I don't think there are any drawbacks except increased compiler complexity?
<muurkha>
it's not like implicitly initializing local variables the way Java does, where it might cost you some performance, since if you wanted to save the work you would have declared the function void
<muurkha>
maybe if the caller looks at something else like strtol's second argument in order to decide whether to look at the function's return value at all? but that seems like an extremely marginal case
<muurkha>
obviously you know C better than I do though
<jrtc27>
clang already has an option to implicitly initialise all local variables to either 0 or a junk pattern
<jrtc27>
msvc does too I believe, and I assume gcc does
<muurkha>
yeah, but people often turn it off in release builds because it costs performance. doing the same with return values, I think, wouldn't?
freakazoid333 has joined #riscv
wingsorc has quit [Read error: Connection reset by peer]
wingsorc has joined #riscv
jwillikers has joined #riscv
jwillikers has quit [Remote host closed the connection]
<gordonDrogon>
I'm surprised about the implicit return 0 thing, but I always compile with -Wall now. I guess the lazy programmers won..
<gordonDrogon>
I was somewhat surprised (and upset) with the quality of code people used to send me when they were trying to use some openSource code I wrote/maintained for a while. I'd suggest they get their programs to compile cleanly with -Wall -Werror but I often got abuse over that )-:
___nick___ has joined #riscv
___nick___ has quit [Client Quit]
___nick___ has joined #riscv
___nick___ has quit [Client Quit]
___nick___ has joined #riscv
<dh`>
does freenode not have timed temporary bans?
<dh`>
usually for autorejoiners it's sufficient to ban them for a couple minutes
<dh`>
anyway, regarding functions that fail to return a value, they are broken, so the compiler should reject them
<dh`>
(including main, IMO)
<dh`>
but I've always taken a very uncompromising view towards people who won't repair obviously wrong code
<muurkha>
rejecting them would be better in many circumstances
<muurkha>
gordonDrogon: some people are just super entitled, and they might have also felt insecure and defensive when sending their code for the first time to someone they don't know, but whose technicaljudgment they respect
<muurkha>
imho almost all bans should be timed temporary bans, though some should last years