added tests related to pr #1110

This commit is contained in:
mrdudz
2020-07-22 15:52:04 +02:00
parent ce06b20c6c
commit 98b2d43c2b
2 changed files with 34 additions and 0 deletions

15
test/err/pr1110.c Normal file
View File

@@ -0,0 +1,15 @@
/* pr #1110 - not only should the current test case for #975 compile and work,
* but also the code piece below fail to compile and generate errors like commented: */
static const unsigned char array[3]; /* OK */
static const unsigned char array[] = { 0, 1, 2 }; /* OK - complete definition*/
static const unsigned char array[3]; /* OK */
static const unsigned char array[]; /* OK */
static const unsigned char array[] = { 1, 2, 3 }; /* Error - redefinition */
static const unsigned char array[4]; /* Error - conflicting size */
int main(void)
{
return 0;
}