Skip to content
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

Add space to error message. #27

Merged
merged 1 commit into from
Mar 17, 2022
Merged

Add space to error message. #27

merged 1 commit into from
Mar 17, 2022

Conversation

egorpugin
Copy link
Contributor

@egorpugin egorpugin commented Feb 11, 2022

Hi,

Currently the error is sticked to previous phrase.
Like

main.cpp:1:1: fatal error: unknown Compiled Module Interface: communication error:Unknown error -1
will be
main.cpp:1:1: fatal error: unknown Compiled Module Interface: communication error: Unknown error -1

Should I also send patch to gcc or libcody is eventually updated from here?


Also I've naively fixed an ICE in module.cc (void module_state::set_filename (const Cody::Packet &packet)):

-      error_at (loc, "unknown Compiled Module Interface: %s",
		packet.GetString ().c_str ());
+      fatal_error (loc, "unknown Compiled Module Interface: %s",
		packet.GetString ().c_str ());

If we do not fail here, tons of ICEs come later.
There can be communication error, so we do not get same number of packets sent about querying modules.
The following function

static void
name_pending_imports (cpp_reader *reader)

iterates over responses and does not check for r_iter == response.end()

	      module->set_filename (*r_iter);
	      ++r_iter;

@urnathan
Copy link
Owner

thanks, but you should report these issues to gcc

@egorpugin
Copy link
Contributor Author

Ok, sure.

This PR with whitespace too?
It won't be overwritten in the future from this repo?

@boris-kolpackov
Copy link
Contributor

I think the whitespace change in client.cc should be applied in this repository and then updated in GCC. The rest I agree are GCC-only changes.

@urnathan urnathan merged commit 0a2c8ae into urnathan:trunk Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants