Description of problem: A valid forward reference to a structure in an external reference is errored by gcc4. Version-Release number of selected component (if applicable): gcc version 4.0.0 20050405 (Red Hat 4.0.0-0.40) How reproducible: always Steps to Reproduce: 1. get test_code.c (from attachment) 2. gcc test_code.c 3. Actual results: test_code.c:7: error: array type has incomplete element type Expected results: This hasn't ever been an error before, I'm not aware of any specification changes to the way forward references work. Additional info:
Created attachment 113510 [details] A simple compile case to demonstrate the issue.
This is not a bug. Your testcase is not valid ISO C. See ISO C99, 6.7.5.2 Array declarators: The element type shall not be an incomplete or function type. Older GCC's issued a pedantic warning (resp. error with -pedantic-errors), in GCC 4.0.x and later this error is unconditional.