Reproducer is 3 files
#include "toto.h"
#include <stdio.h>
int main() {
toto p;
p.t = 3;
printf("loli %llx\n", p.t);
return 0;
}
#include "tata.h"
typedef struct toto {
tata t;
} toto;
#include <stdint.h>
typedef int64_t tata;
Program compiles and behaves as expected cf :
But running cppclean gives a false positive
cppclean toto.h
toto.h:1: 'tata.h' does not need to be #included
Removing the include fives compilation error :
clang lol.c
In file included from lol.c:1:
./toto.h:4:2: error: unknown type name 'tata'
tata t;
^
1 error generated.