intel / yarpgen

Yet Another Random Program Generator
Other
469 stars 50 forks source link

yarpgen claims to be compliant with the standard, but is using the gcc extension __typeof__ #171

Open winspool opened 1 year ago

winspool commented 1 year ago

Section 3 in the included document (yarpgen-ooplsa-2020.pdf) claims, that yarpgen can generate C source, that is "compliant with the rules specified in the language standards".

But the code is using __typeof__ (in the macros max and min), which is a non standard gcc extension.

A similar feature typeof was accepted for the upcoming C23 standard, but that feature is not implemented in all compiler for some time.

Vsevolod-Livinskij commented 1 year ago

Thanks for the report! This issue only exists in the current version of the YARPGen, and I'll work on fixing it!

The paper you mentioned describes the old version of YARPGen. It was designed to test scalar optimizations and does not contain any function calls or min and max macros. Therefore, the claim about being compliant with the standard is truthful to the best of my knowledge.