Commit 7d8140d
committed
kernel/mem: Fix Cygwin compat
Avoid error:
```
kernel/mem.cc:1683:7: error: conflicting declaration ‘using addr_t = using addr_t = uint32_t’
1683 | using addr_t = MemContents::addr_t;
| ^~~~~~
In file included from /usr/include/sys/types.h:222,
from /usr/include/pthread.h:11,
from /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35,
from /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/x86_64-pc-cygwin/bits/gthr.h:148,
from /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/ext/atomicity.h:35,
from /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/bits/cow_string.h:37,
from /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/bits/basic_string.h:51,
from /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/string:53,
from ./kernel/yosys_common.h:27,
from ./kernel/yosys.h:42,
from ./kernel/mem.h:23,
from kernel/mem.cc:20:
/usr/include/machine/types.h:63:15: note: previous declaration as ‘typedef char* addr_t’
63 | typedef char *addr_t;
```
According to IntelliSense, only the return types need to be prefixed with `MemContents::`, the rest are automagically using the class definition and highlight as `using Yosys::MemContents::addr_t = uint32_t`.1 parent 16a5950 commit 7d8140d
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1680 | 1680 | | |
1681 | 1681 | | |
1682 | 1682 | | |
1683 | | - | |
1684 | | - | |
1685 | 1683 | | |
1686 | 1684 | | |
1687 | 1685 | | |
| |||
1758 | 1756 | | |
1759 | 1757 | | |
1760 | 1758 | | |
1761 | | - | |
| 1759 | + | |
1762 | 1760 | | |
1763 | 1761 | | |
1764 | 1762 | | |
| |||
1786 | 1784 | | |
1787 | 1785 | | |
1788 | 1786 | | |
1789 | | - | |
| 1787 | + | |
1790 | 1788 | | |
1791 | 1789 | | |
1792 | 1790 | | |
| |||
1829 | 1827 | | |
1830 | 1828 | | |
1831 | 1829 | | |
1832 | | - | |
| 1830 | + | |
1833 | 1831 | | |
1834 | 1832 | | |
1835 | 1833 | | |
| |||
0 commit comments