Improved grammar

This commit is contained in:
BlackMark 2020-02-01 22:28:44 +01:00
parent a30b78fb81
commit 80de36ee7e

4
io.hpp
View File

@ -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: 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; 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 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. 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") #pragma push_macro("_MMIO_BYTE")