Doesn’t it get optimized by compiler automatically anyway?

|
alexmb7 2022-07-30 10:42:20
not c null ending, i hate that bs
smol_mazunki 2022-07-30 10:42:25
with ”
smol_mazunki 2022-07-30 10:42:34
else memory security exception
alexmb7 2022-07-30 10:42:45
i wont use printf then
alexmb7 2022-07-30 10:43:06
only in safe math content *dreams*
alexmb7 2022-07-30 10:43:25
printf is for me useless
cause it kills user data nulls
smol_mazunki 2022-07-30 10:43:26
you can use snprintf(stdout, 1024, “%s”, buffer)
alexmb7 2022-07-30 10:43:40
hmh
smol_mazunki 2022-07-30 10:43:40
it will max at 1024 char
alexmb7 2022-07-30 10:43:49
what if null appears
alexmb7 2022-07-30 10:43:53
it still does
smol_mazunki 2022-07-30 10:43:58
i think no
alexmb7 2022-07-30 10:44:03
then for no use too
alexmb7 2022-07-30 10:44:22
the fprintf … does this one work
alexmb7 2022-07-30 10:44:35
fputs or fwrite i suppose
alexmb7 2022-07-30 10:45:10
i may fread and fwrite.. then works ?
K11M1 2022-07-30 10:45:12
Doesn’t it get optimized by compiler automatically anyway?
alexmb7 2022-07-30 10:45:20
which
alexmb7 2022-07-30 10:45:21
no
alexmb7 2022-07-30 10:45:25
its code u write
alexmb7 2022-07-30 10:45:32
every code compiles differently
alexmb7 2022-07-30 10:45:39
u mean in AI content
alexmb7 2022-07-30 10:45:45
yes but we dont have those
smol_mazunki 2022-07-30 10:46:21
K11M1 2022-07-30 10:45:12
Doesn’t it get optimized by compiler automatically anyway?

-O0 to avoid that

K11M1 2022-07-30 10:46:43
You want to have the optimization on in release
smol_mazunki 2022-07-30 10:46:48
uh, i forgot, snprintf takes a char pointer, not a stream
alexmb7 2022-07-30 10:46:50
i only -O9 ( it doesnt error )
smol_mazunki 2022-07-30 10:47:05
-O3 and above is all the same
smol_mazunki 2022-07-30 10:47:09
cool kids use -O69
alexmb7 2022-07-30 10:47:44
hehh
K11M1 2022-07-30 10:48:18
It seems I mistook the conversation, I thought you were trying to print bunch of strings but you wanted to do it in one go
smol_mazunki 2022-07-30 10:48:20
i’m thinking
smol_mazunki 2022-07-30 10:48:28
how to pass “Helloworld” to stdout
smol_mazunki 2022-07-30 10:48:31
as a string
alexmb7 2022-07-30 10:48:40
fwrite
|