YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp;
For the code above,it just reports:
Description Resource Path Location Type
syntax e开发者_如何学Gorror before "yyvsa" yysphinxexpr.c /sp/src line 852 C/C++ Problem
Which is far from useful,is it for configuration reasons?
That fragment looks reasonable. Whenever I run into an error message that doesn't make sense, I try to narrow it down using a process like the following:
- Verify that I can reproduce the error with as few dependencies as possible (e.g. removing unnecessary classes, includes, etc.)
- Compiling the file manually and seeing if the error is the same or is being interpreted before being displayed
- Preprocessing the file and then manually examining. Sometimes macros will stomp on themselves or do things you don't expect. If you can preprocess the file (e.g. gcc -E [opts] filename) you'll see what the compiler is ultimately processing, which may help.
- Trying with a different compiler. Sometimes a different compiler will produce an error message that makes more sense to you... or you'll find out that somebody did something that's only permitted by certain compilers.
精彩评论