3c -alltypes
deletes bodies of unnamed struct types
#542
Labels
benchmark failure
A bug causing a failure in our nightly benchmark tests
When
3c -alltypes
is run on the following input:it produces the following warnings:
and the following output:
which produces the following compile errors (included here for ease of finding this issue in a search):
The 3C warning (added in #366) suggests that we knew that 3C doesn't handle this case correctly, but we don't seem to have an open issue for that, so I'm filing this one. Apparently this "rewriting" of inline structs is another 3C feature controlled by
-alltypes
that I was unaware of; indeed, it ~"tries to generate output that is closer to what you ultimately want but may not pass the type checker right away without manual corrections" (here's our documentation). But 3C should be able to handle this in some more graceful way than introducing syntax errors that may confuse users new to Checked C. Maybe 3C could insert a dummy struct name that would cause an "undefined struct" error instead of a syntax error; then users who overlooked the 3C warning could search the web for the dummy struct name and find this issue.This is causing a handful of errors in our benchmarks.
The text was updated successfully, but these errors were encountered: