diff options
Diffstat (limited to 'compiler/cpp/src/thrift/thriftl.ll')
-rw-r--r-- | compiler/cpp/src/thrift/thriftl.ll | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/cpp/src/thrift/thriftl.ll b/compiler/cpp/src/thrift/thriftl.ll index 377351649..810a983e0 100644 --- a/compiler/cpp/src/thrift/thriftl.ll +++ b/compiler/cpp/src/thrift/thriftl.ll @@ -86,6 +86,12 @@ void unexpected_token(char* text) { exit(1); } +void error_no_longer_supported(char* text, char* replace_with) { + yyerror("\"%s\" is no longer supported, use \"%s\" instead. Line %d\n", text, replace_with, yylineno); + exit(1); +} + + %} /** @@ -234,12 +240,10 @@ literal_begin (['\"]) "string" { return tok_string; } "binary" { return tok_binary; } "slist" { - pwarning(0, "\"slist\" is deprecated and will be removed in a future compiler version. This type should be replaced with \"string\".\n"); - return tok_slist; + error_no_longer_supported("slist","string"); } "senum" { - pwarning(0, "\"senum\" is deprecated and will be removed in a future compiler version. This type should be replaced with \"string\".\n"); - return tok_senum; + error_no_longer_supported("senum","string"); } "map" { return tok_map; } "list" { return tok_list; } |