:) It's that bad for folks who like warnings as errors. A reasonable thing to do for project code. Probably, that shouldn't be done for configure probes. So, my project will be 4 bytes larger now. :-D
config/ag_macros.m4 has a couple of bugs
Not defaulting to an "int" return type is a severe divergence from historical "C". Is that under the control of a cranked up warning level? That breaks the world. Anyway, I've applied your patch to my sources. If I can ever get "autoreconf" to work again, then I'll release it. :(
Thank you. I can't get it to build myself. The underlying infrastructure has been "improved" to the point where I have to adapt to the changes. Fixed now.
If the putative undefined behavior actually becomes programmatically incorrect, then the compiler/OS implementation will be grossly incorrect. Meanwhile, this is only ever used if the defs are being read from a pipe or other source wherein you cannot determine its size. It should be pretty rare that it's ever used and when it's used, it will likely squander several microseconds. IOW, I'll make your suggested change. :) thank you.
P.S. the GCC bug's cause might be the temporary use of rem_sz for the allocation size. In the GIT sources, I've changed those 3 lines to 5, but I've not compiled or tested yet. { size_t sz = data_sz+sizeof(long)+sizeof(*base_ctx); base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf"); memset(VOIDP(base_ctx), 0, sz); }
P.S. the GCC bug's cause might be the temporary use of rem_sz for the allocation size. In the GIT sources, I've changed those 3 lines to 5, but I've not compiled or tested yet. { size_t sz = data_sz+4+sizeof(*base_ctx); base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf"); memset(VOIDP(base_ctx), 0, sz); }
P.S. the GCC bug's cause might be the temporary use of rem_sz for the allocation size. In the GIT sources, I've changed those 3 lines to 5, but I've not compiled or tested yet. { sz = data_sz+4+sizeof(*base_ctx); base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf"); memset(VOIDP(base_ctx), 0, sz); }