Hi,
I'm working on a code to run threads. But as I was trying to remove unnecessary stuff from the code I noticed something interesting.
the program size is different when compiling the code with these three enum configurations:
typedef enum: uint8_t {NOT_FINISHED, FINISHED}STATE; // flash used = 4840
typedef enum {NOT_FINISHED, FINISHED}STATE; // flash used = 4868
typedef enum: bool {NOT_FINISHED, FINISHED}STATE; // flash used = 4906
I thought with bool, size should be smaller !
I know it doesn't matter at the end since the elements of the enum aren't having values over 1.
Another question:
Does this:
#ifdef __cplusplus
extern "C" {
#endif
.
.
.
#ifdef __cplusplus
}
#endif
Conflict with using something related to a line that has C++ feature like:
typedef enum: uint8_t {NOT_FINISHED, FINISHED}STATE;
As specifying the type of enum is C++ feature as I learned, if the information I learned is correct.