This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] PR 54501


Hi,

for this kind of code, using the GNU zero-size array extension:

int a[][0] = {0};

we end up looping forever in the reshape_init_array_1 loop because it calls reshape_init_r -> reshape_init_array -> reshape_init_array_1 which returns early a CONSTRUCTOR with no error. Having considered various solutions, I'm proposing to break the endless loop in reshape_init_array, where we have information about the type of the zero-size array and we can easily provide an accurate error message.

Tested x86_64-linux.

Thanks,
Paolo.

//////////////////////


Attachment: CL_54501
Description: Text document

Attachment: patch_54501
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]