Am Dienstag, dem 06.08.2024 um 14:22 +0200 schrieb Alejandro Colomar: > Hi! > > - The tests seem to work as expected if I compile them manually, and > run (the one that should be run) as a normal program. The one that > should not be run also gives the expected diagnostics. > Can anyone give advice of why it's not running well under the test > suite?
What is the output? You get an additional warning / error. > > - I don't like the fact that [*][n] is internally implemented exactly > like [0][n], which makes them indistinguishable. All other cases of > [0] return a constent expression of value 0, but [0][n] must return a > variable 0, to keep support for [*][n]. > Could you please change the way [*][n] (and thus [*]) is represented > internally so that it can be differentiated from [0]? > Do you have in mind any other way that would be a viable > implementation of [*] that would allow distinguishing [0][n] and > [*][n]? Maybe making it to have one node instead of zero and mark > that node specially? The C++ frontend encodes zero-sized arrays using a range of [0,-1]. I have a half-finished patch which implements this for the C FE. Martin