gaul

Joined 16 years ago

Karma
858
Submissions
88
Member since
Jul 1
Chief simulacrum officer, chronicler of hipster museums, and Potemkin geek. https://gaul.org/

[ my public key: https://keybase.io/gaul; my proof: https://keybase.io/gaul/sigs/DtswoGs6HGcXb01P9qsR9TH65rJFSUZ0SuqiSV7ZXKY ]

View on Hacker News

Recent submissions

Comment · 4 years ago
https://tt-rss.org/ is a free software, self-hosted alternative and https://ttrss.info/ is a paid hosted offering.
Comment · 5 years ago
Comment · 5 years ago
clang's -Wshorten-64-to-32 can catch this:

https://clang.llvm.org/docs/DiagnosticsReference.html#wshort...

The more general-purpose -Wconversion has many false positives, often around int to char conversion. Some functions like int toupper(int) have an unexpected int return type to deal with special out-of-bound values like EOF.

Comment · 5 years ago
This is not a NOP; it explicitly clears the upper 32 bits of EDI since the compiler does not know that they are zero in this situation. If you change cc from an int to size_t (long on x86-64) the compiler will generate:

        mov     eax, OFFSET FLAT:.LC0
        cmp     rdi, 258
        ja      .L1
        mov     rax, QWORD PTR CSWTCH.1[0+rdi*8]
Note that in some cases the compiler can do this automatically via lifetime analysis but not in this freestanding example.
Comment · 5 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton