[PATCH] D48412: [RISCV] Support for __attribute__((interrupt))

Simon Cook via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 21 02:08:09 PDT 2018


simoncook added a comment.

I think this should also cover mismatched arguments if the attribute appears several times, and reject/warn about the attribute combination in these cases.

For example, `__attribute__((interrupt("machine"))) __attribute__((interrupt("user"))) void foo() {}` is accepted, and adds the attribute `"interrupt"="user"`. It seems whichever is first used appears on the function.

I don't have an up to date GCC to compare to see what it does in this case, nor am sure whether repeating the same interrupt type should be accepted.


https://reviews.llvm.org/D48412





More information about the cfe-commits mailing list