diff --git a/io.hpp b/io.hpp index 7918134..508fe47 100644 --- a/io.hpp +++ b/io.hpp @@ -130,10 +130,10 @@ namespace detail { The following works in avr-gcc 5.4.0, but is not legal C++, because ptr's are not legal constexpr's: constexpr auto *foo = ptr; -Workaround is to store the the address of the ptr in a uintptr_t and reinterpret_cast it at call site. +Workaround is to store the address of the ptr in a uintptr_t and reinterpret_cast it at call site. The _SFR_ADDR macro in sfr_defs.h would give the address, but it does that by taking the address of the dereferenced pointer and casts it to uint16_t, which is still not a legal constexpr. -The workaround therefore is to disable the pointer cast and dereference macro _MMIO_BYTE temporarily. +The workaround therefore is to disable the pointer-cast-and-dereference macro _MMIO_BYTE temporarily. */ #pragma push_macro("_MMIO_BYTE")