3 ms·
> I do use C preprocessor whenever I can. But since ARM assembler uses # to refer to constants, and C preprocessor uses # for different purpose, you can't use i
by stephencanon 14y ago
> I do use C preprocessor whenever I can. But since ARM assembler uses # to refer to constants, and C preprocessor uses # for different purpose, you can't use it most of the time. I'd love to know if you have a work around.
My "work around", such as it is, is that the C standard says that # shall be followed by a macro parameter; if it isn't (as will be the case with # in ARM assembly) the behavior is undefined by the standard, and it happens that LLVM does the "right thing" (from the perspective of someone who wants to get things done without a lot of hassle) and simply passes the # through unchanged.
This is obviously imperfect, but it works for my purposes. It may not be sufficient for your needs.
The inability of (some builds of?) gas to support implicit sources under .syntax unified has also annoyed me.