emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Paul Eggert
Subject: Re: Dynamic loading progress
Date: Sun, 22 Nov 2015 10:37:55 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

I'm not going to belabor the point. If you want to use sizes as version numbers it's not worth fighting over. If we ever change a function API without changing the structure layout, I guess we'll have to insert a dummy structure member to make the size grow. Sounds like a kludge, but there are worse kludges in Emacs.

Getting back to the original issue, your worry was that a ptrdiff_t size would lead to unnecessary warnings. I didn't get any such warning when compiling this with gcc -Wall:

#include <stddef.h>
ptrdiff_t size;

int main (void) { return size < sizeof size; }

I expect the warnings you're worried about occur when comparing an unknown ptrdiff_t with an unknown size_t; they should not occur when comparing an unknown ptrdiff_t with a size_t constant. If that's the case, let's leave it ptrdiff_t. And even if it's not the case, I'm inclined to leave it ptrdiff_t, as any module code will run into similar issues with the other ptrdiff_t components, so why make an exception for this one?



reply via email to

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