[Solved]Linter fails but build succeeds

Using Atmel AVR, I have code like

#include <stdbool.h>

typedef struct {
 bool f0:1;
 bool f1:1;
 bool f2:1;
 bool f3:1;
 bool f4:1;
 bool f5:1;
 bool f6:1;
 bool f7:1;
} PackedBool;

#define i2c_addressed ( (volatile PackedBool*)(&GPIOR0) )->f0

i2c_addressed=TRUE; 

This compiles correctly without errors in Platformio and Atmel Studio, but throws annoying errors in the linter like ‘_Bool’ does not name a type.

What am I doing wrong?

Could you try temporary Redirecting... ?

Thanks Ivan, but after recent upgrades of Atom and Platformio, problem seems to have disappeared

[Platformio IDE 2.0.0-beta7, core 3.4.1a1linter 2.2.0, linter-gcc 0.7.1, Atom 1.18.0, AtmelAVR 1.5.0]

1 Like