-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change fatal error to error #327
Comments
It was already seen that some tests are a bit too verbose because of the current compiler state. For these tests, the solution is to tell dg that we are expecting some output from the compiler and it should not consider this as an error. If your change simply adds some output, adding |
I wanted to see how "bad" this change would break current tests.
It looks like its currently harmless. |
Becomes:
Is it what you expected from this :
|
What if we just remove the error message completely? It doesn't really add any more information. What do you think? |
Some of those other error messages are also not helpful too, the goal here in this issue is the fatal_error blocks the output of the toy Typed HIR dump which blocks us from debugging stuff. So I think diagnostic errors improvements should be a separate issue. |
I suggest just doing this: lrh2000@9a6441d (or removing the Then the error messages for the above program will become
The result is exactly what I expected, and
It does not break any current tests. Maybe we should add new tests to check the last error message? |
This fatal error stops the compiler in its tracks and will mean the Typed HIR dump will not occur limiting how much we can debug errors/bugs in the compiler. Fixes #327
374: Add basic wrapper over gcc rich_location r=philberty a=philberty Adding rich location will improve our error message diagnostics, this is an initial building block to keep a wrapper over the GCC stuff we call. Addresses: #97 Fixes: #327 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
374: Add basic wrapper over gcc rich_location r=philberty a=philberty Adding rich location will improve our error message diagnostics, this is an initial building block to keep a wrapper over the GCC stuff we call. Addresses: #97 Fixes: #327 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
gccrs/gcc/rust/typecheck/rust-hir-type-check-stmt.h
Line 80 in d7593fe
This fatal error is annoying because if we get a bad type error for example "expected u32 got f32" we get back a TyTy::Error which is correct. This stops the type resolver going through the rest of the crate and we wont get any typed HIR debug dump to help diagnose the error if it is a bug.
This change will likely break some of the expected failure test cases @dkm any opinion?
In general we should open a new issue to think about handling lots of errors in general.
The text was updated successfully, but these errors were encountered: