bug-gnulib
[Top][All Lists]
Advanced

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

Re: Compilation problem with base64.c


From: Guy Rutenberg
Subject: Re: Compilation problem with base64.c
Date: Tue, 30 Oct 2007 22:33:58 +0200

Hi,

On Oct 30, 2007 10:27 PM, Micah Cowan <address@hidden> wrote:

The "restrict" keyword, as used, is entirely appropriate for C code, as
it is part of the C language. It is not part of the C++ language (at
least not yet).

It's a relatively recent addition to the C language, so the restrict
keyword is #defined to nothing for C compilers that don't support it
(doesn't apply to modern GCC, which has supported it for a while, but
_only_ when running as a C compiler). base64.c and .h expect that they
are being built using a configuration-and-build environment that makes
use of its autoconf macros and other dependencies that gnulib (mostly)
automatically sets up for it. The m4 code that comes with these files
invokes autoconf's AC_C_RESTRICT macro, which handles the case that the
restrict keyword isn't supported for your compilation environment.

Since what version of GCC is the restricted keyword available? I've tried compiling the code with gcc ( 4.1.2) and it doesn't recognized this keyword. Compiling using gcc instead of g++ solved all compilation errors except the restrict (which I guess is solved by using the automake code provided).

Thanks very much for your help,

Regards,
Guy

reply via email to

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