macros - Warning: ISO C forbids an empty translation unit -



macros - Warning: ISO C forbids an empty translation unit -

in header file have next code gives me error in title, while trying link.

#ifndef boolean_h #define boolean_h #ifndef false #define false 0 #endif #ifndef true #define true !false #endif #endif indicating error occurs in line of lastly #endif

gcc when compiled -pedantic reports diagnostic when translation unit empty requested c standard. create gcc happy, can add together dummy typedef in empty .c file:

typedef int make_iso_compilers_happy;

or

extern int make_iso_compilers_happy;

c macros

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -