How do I control what the sizeof(uint32_t) is? #11778
Replies: 2 comments
|
Hi Dave Hylands (@dhylands) . It shouldn't be necessary to specify a compiler's system include paths. If you're configuring the C/C++ Extension with a However, the issue you're encountering may (also) be related to the C/C++ Extension currently only supporting a fixed set of |
|
My compilerPath is set like this: then I get this output: If my source file contains: and I hover over the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
If I create this file:
then the static_assert appears with red squiggles under it. If I hover over the
FLOAT_SIZEvariable it shows me that it has a value of4.If I hover over the
uint32_tvariable then it shows me that it has a value of8.Hovering over
UINT_SIZEshows4which should be2for the compiler I'm using.Hovering over
UINT_LONG_SIZEshows8which should be4for the compiler I'm using.I'm using a MSP430 compiler which has 16-bit ints, so
sizeof(unsigned int)is2andsizeof(unsigned long int)is4.This particular codebase is being compiled targeting the MSP430 GCC compiler. I already have:
set in my settings.json file. I also have
in my "C_Cpp.default.includePath" which is why it's detecting that
uint32_tis the typeunsigned long.Is there someway to tell the extension that sizeof(int) is 2 rather than 4? (and that
sizeof(unsigned long)is4?)All reactions