Fixed false "Non constant initializers" error messages on wrong places, which could be resulted from failed array declarations etc.

This commit is contained in:
acqn
2024-01-10 04:43:50 +08:00
parent 2564aaa12c
commit 94dfc08c0e
3 changed files with 17 additions and 3 deletions

View File

@@ -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;