I've been going through some types defined in libgcc. They are all apparently mapped to the same type named bogus_type
. I can not find its definition.
#define SItype bogus_type
#define USItype bogus_type
#define DItype bogus_type
#define UDItype bogus_type
#define SFtype bogus_type
#define DFtype bogus_type
What does this type map to? Is it even a valid type or something like NULL
?
Since the
define
is just a text replacement that take place before the compilation phase, as long as no one will use the defined type, there be no replacement tobogus_type
and nothing will happen. If someone will use those types, they will be replaced withbogus_type
which is in fact not defined anywhere which will make the compilation to failed.so basically
bogus_type
is just a rabbis that is used to forcely failed the build in case of a use in a specific type. For the sake of it, it could be:Here's another example of this "type" being used.
That said, it's not a type. It's a legitimate code breaker to enforce the restriction on using certain types in certain places of the program. Should it fire, compilation should fail with a syntax error, since
bogus_type
does not exist.It's not any "less-than-known" part of the language, it's just clever use of the C preprocessor.
It is put before some code that should not accidentally use one of these types later on. So if it is using one of these, the compiler would throw an error, since there is no such a
bogus_type
type.