The __COUNTER__ macro (used for generating unique names) is at least supported by gcc, clang and Visual Studio. With this change test_compiles.c is compilable, since no more typedefs are redefined. Compilers/Preprocessors not supporting __COUNTER__ error's are still possible which are hopfully handled by the usage of __LINE__ in most sittuations. Added unit test for the problem.
10 lines
270 B
Protocol Buffer
10 lines
270 B
Protocol Buffer
// Test if including generated header file for this file + implicit include of
|
|
// callbacks.pb.h still compiles. Used with test_compiles.c.
|
|
import "callbacks.proto";
|
|
|
|
message Callback2Message {
|
|
required TestMessage tstmsg = 1;
|
|
required SubMessage submsg = 2;
|
|
}
|
|
|