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

Default source line format compatible with compiler error format #315

Open
iripoll opened this issue Sep 21, 2023 · 1 comment
Open

Default source line format compatible with compiler error format #315

iripoll opened this issue Sep 21, 2023 · 1 comment

Comments

@iripoll
Copy link

iripoll commented Sep 21, 2023

It would be nice, that by default, the line printed by print_source_loc() has the same aspect than those generated by most compilers.
That is: [filename]:[line]

May code editors accept this syntax to open the file and move to the line. May be other debugging tools can also benefit from this small change. The current print is very human friendly, but it is less practical.

Here is an example:
Current line error looks like:
#0 Source "src/statistics.c", line 29, in BlockEntropy(void *data) ....

Suggested change:
#0 Source "src/statistics.c:29", in BlockEntropy(void *data) ....

@stelzch
Copy link

stelzch commented Dec 22, 2023

I also ran across the same issue and created a PR.

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

No branches or pull requests

2 participants