Check for double dash may be done in for loop.
arg.h:
https://pastebin.com/c4FQcrtH
I tried to compare objdump'ed compiler output with different options -
filesizes are same, though difference exists.
There are diffs for 3 -O levels: -O3, -O2, -Os.
For -O3:
--- tabbed-O3-1.o.objdump 2021-07-05 21:13:23.601297273 +0500
+++ tabbed-O3-2.o.objdump 2021-07-05 21:13:57.461296518 +0500
_AT_@ -2327,10 +2327,10 @@
cmpb $0x2d,(%rbx)
jne <main+0x135>
movzbl 0x1(%rbx),%eax
- test %al,%al
- je <main+0x135>
cmp $0x2d,%al
je <main+0xcd0>
+ test %al,%al
+ je <main+0x135>
mov 0x0(%rip),%r11d # <main+0x84>
add $0x1,%rbx
xor %r9d,%r9d
For -O2:
https://pastebin.com/4WR3L8dc
With -Os:
https://pastebin.com/09LNut3R
tabbed.o with -O2:
https://pastebin.com/yb0jCE6W
Received on Tue Jul 06 2021 - 01:21:02 CEST