This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mingw-w64 cross compiling
On Tue, Sep 18, 2012 at 3:00 PM, Christer Solskogen
<christer.solskogen@gmail.com> wrote:
> On Tue, Sep 18, 2012 at 8:07 PM, Ian Lance Taylor <iant@google.com> wrote:
>>> Today when trying to build trunk, I encountered this error. But has
>>> not yet figured out how to fix it...
>>
>> I just committed a patch that should fix that problem.
>>
>> If there are other problems building libbacktrace, let me know.
>>
>
> You wanna take this as well? :-)
Not really....
> dump_maybe_newline (di);
> - fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
> + fprintf (di->stream, "%-4s: %-8lx ", field, (uintptr_t) ptr);
unsigned long is the correct type. You are using uintptr_t to avoid a
warning. But you need to wind up with unsigned long, in case that is
not the same as uintptr_t. That is, you need to write
fprintf (... (unsigned long) (uintptr_t) ptr);
Same for other cases involving fprintf %lx.
> --- gcc/prefix.c (revision 191450)
> +++ gcc/prefix.c (working copy)
> @@ -157,12 +157,12 @@
> }
>
> size = 32;
> - dst = xmalloc (size);
> + dst = (char *) xmalloc (size);
This should use XNEWVEC.
> res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
> if (res == ERROR_MORE_DATA && type == REG_SZ)
> {
> - dst = xrealloc (dst, size);
> + dst = (char *) xrealloc (dst, size);
This should be XRESIZEVEC.
Ian