Fixed false "Non constant initializers" error messages on wrong places, which could be resulted from failed array declarations etc.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
typedef short return_t;
|
||||
#error /* produce an error */
|
||||
#error This is an/* produce an error */error
|
||||
|
||||
return_t main(int argc, char* argv[])
|
||||
{
|
||||
@@ -22,3 +22,6 @@ return_t main(int argc, char* argv[])
|
||||
n = 0; /* produce an error */
|
||||
/* produce a warning */
|
||||
}
|
||||
|
||||
int arr[main(0, 0)]; /* produce an error */
|
||||
int b = 0;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
custom-reference-error.c:17: Error: #error
|
||||
custom-reference-error.c:17: Error: #error: This is an error
|
||||
custom-reference-error.c:21: Error: Call to undeclared function 'printf'
|
||||
custom-reference-error.c:22: Error: Undeclared identifier 'n'
|
||||
custom-reference-error.c:24: Warning: Control reaches end of non-void function [-Wreturn-type]
|
||||
custom-reference-error.c:24: Warning: Parameter 'argc' is never used
|
||||
custom-reference-error.c:24: Warning: Parameter 'argv' is never used
|
||||
custom-reference-error.c:26: Error: Constant integer expression expected
|
||||
|
||||
Reference in New Issue
Block a user