Eisenwave / cdecl-plus

Similar to cdecl.org, but with broader support for language features. Static web page which supports file protocol. Parsing and to-prose conversion happen in the front-end, resulting in instant feedback.
https://cdecl.plus/
MIT License
32 stars 4 forks source link

Precision specified by only a period is defined behavior #16

Closed Halalaluyafail3 closed 1 year ago

Halalaluyafail3 commented 1 year ago

cdecl+ Input

printf("%.i",i)

Expected Prose

Write a decimal int precision: 0 (implicit, only the period was specified)

ARGUMENTS & EXPECTED TYPES -------------------------- i (int)

Actual Prose or Error

The given format string is invalid. This results in undefined behaviour.

Additional Context

When only the period is specified for the precision, the precision is assumed to be zero.