Commit Graph

2 Commits

Author SHA1 Message Date
Christopher Bazley
f4d81ced3e tccgen: Minimal implementation of restrict
TCC currently recognises the restrict keyword but
discards it. Give the qualifier its own type bit and
diagnose misuse that violates constraints in ISO C.

There is (obviously) no new aliasing analysis.
2026-09-26 21:47:46 +01:00
Petr Skocik
ef668aae1e Don't fail on const/restrict/static/* inside []
This patch makes tcc ignore them.

Normally (as per the C standard), They should
be only applicable inside parameter arrays
and affect (const/restrict) the pointer the
array gets converted to.

[matz: fix formatting, add volatile handling, add testcase,
add comment about above deficiency]
2018-04-01 00:48:09 +02:00