[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scratch/accurate-warning-pos: next steps.

From: Paul Eggert
Subject: Re: scratch/accurate-warning-pos: next steps.
Date: Tue, 11 Dec 2018 11:59:27 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 12/11/18 11:20 AM, Alan Mackenzie wrote:
If so, aren't we limiting builds to platforms that have binutils,
which would be a new restriction?
Well, we use ld, which also belongs to binutils, and that doesn't seem
to restrict the platforms.  Other platforms surely have equivalents to
both objdump and ld, and they are/would be used appropriately.

We don't use ld, at least not directly. The makefile uses $(CC), just as it uses $(CC) to compile. On GNU/Linux hosts this eventually uses ld (or gold or whatever), but those details are largely immaterial.

If we required objdump or similar utilities, that would be yet another porting hassle. And we might run into platforms where there is no objdump-like utility and we have to write one ourselves. This doesn't sound good at all.

globals.h seems to manage.

globals.h manages because we decorate every symbol it needs to find. If we have to decorate every C function that might call EQ (either directly or indirectly), that would also work but it would be a lot more intrusive than globals.h is. And the proposal to use objdump seems to acknowledge this, by proposing a method that wouldn't require such decoration but would have significant portability problems.

It should be easy enough to move shared file-static data into another
file, that would be compiled only once.
Possibly not.  The same would have to be done with file global data,
too.  But doing it that way would involve a great deal of change to the
source code (testing for the -D option) which would not be popular.

It'd be less change than having to decorate every function that might call EQ.

It would likely slow down the compilation by a very great deal.

That's OK, if the cost is borne only by people who want accurate diagnostics. People who want compilation speed can simply turn off the accurate-diagnostics flag.

You're conflating "tedious" with "tedious in the extreme".

We're estimating how much work would be needed. Even if there would be more work in changing the byte compiler, it shouldn't be so much more work that we need to contort all the rest of Emacs. It's better to localize such changes when possible.

This would place onerous restrictions on what macros were allowed to do,
and likely be incompatible with a vast proportion of existing macros.

But under both proposals I mentioned, existing macros would work just fine with no new restrictions. So what I think you're saying is that if people want to write macros that allow for more-accurate diagnostics, they'll find that they can't easily do it for some reason. What reason would that be? Can you give an example based on some macro already defined in Emacs?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]