For me, BUILD_MESSAGE works as expected with Clang but not GCC. With
Clang:
../lib/flow.c:126:1: warning: FLOW_WC_SEQ changed: miniflow_extract() will
have
runtime assertions enabled. Consider updating FLOW_WC_SEQ after
testing
[-W#pragma-messages]
BUILD_MESSAGE("FLOW_WC_SEQ changed: miniflow_extract() will have runtime "
^
../lib/compiler.h:229:5: note: expanded from macro 'BUILD_MESSAGE'
DO_PRAGMA(message(x))
^
../lib/compiler.h:227:22: note: expanded from macro 'DO_PRAGMA'
#define DO_PRAGMA(x) _Pragma(#x)
^
<scratch space>:8:2: note: expanded from here
message("FLOW_WC_SEQ changed: miniflow_extract() will have runtime " "a...
^
but with GCC:
../lib/flow.c:126:1: error: Expected ) in function declarator
../lib/flow.c:126:1: error: got "message(\"FLOW_WC_SEQ changed:
miniflow_extract() will have runtime \" \"assertions enabled. Consider updating
FLOW_WC_SEQ after \" \"testing\")"
../lib/flow.c:210:12: error: Expected ) in function declarator
../lib/flow.c:210:12: error: got (
../lib/flow.c:210:5: error: Trying to use reserved word 'while' as
identifier
../lib/flow.c:212:15: error: Expected ) in function declarator
../lib/flow.c:212:15: error: got ->
../lib/flow.c:212:9: error: Trying to use reserved word 'if' as identifier
../lib/flow.c:214:9: error: Expected ; at the end of type declaration
../lib/flow.c:214:9: error: got }
[and on and on...]
Do you know how to make it work with GCC? A few experiments didn't work
for me.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev