* Moving from 4.1.2 to 4.2.3 generates problems with size_t def.
@ 2008-03-02 15:36 Paulo J. Matos
2008-03-02 15:53 ` Paulo J. Matos
0 siblings, 1 reply; 2+ messages in thread
From: Paulo J. Matos @ 2008-03-02 15:36 UTC (permalink / raw)
To: help-gcc
Hi all,
I just moved from 4.1.2 to 4.2.3 and I am getting an error in my
timemgm.c:16 file. Line 16 is the first non-comment line of the file
with #include<stdlib.h> and I get:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./include -D_GNU_SOURCE
-Wall --std=c99 -Werror -g -O2 -MT dsat-timemgm.o -MD -MP -MF
".deps/dsat-timemgm.Tpo" -c -o dsat-timemgm.o `test -f 'timemgm.c' ||
echo './'`timemgm.c; \
then mv -f ".deps/dsat-timemgm.Tpo" ".deps/dsat-timemgm.Po"; else rm
-f ".deps/dsat-timemgm.Tpo"; exit 1; fi
In file included from /usr/include/stdlib.h:33,
from timemgm.c:16:
/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/include/stddef.h:214: error:
expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
In file included from timemgm.c:16:
/usr/include/stdlib.h:140: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '__ctype_get_mb_cur_max'
In file included from timemgm.c:16:
/usr/include/stdlib.h:455: error: expected declaration specifiers or
'...' before 'size_t'
/usr/include/stdlib.h:485: error: expected declaration specifiers or
'...' before 'size_t'
/usr/include/stdlib.h:487: error: nonnull argument with out-of-range
operand number (argument 1, operand 4)
/usr/include/stdlib.h:589: error: expected ')' before '__size'
/usr/include/stdlib.h:591: error: expected ')' before '__nmemb'
/usr/include/stdlib.h:600: error: expected declaration specifiers or
'...' before 'size_t'
Is there any reason for this?
The lines around stddef.h:214 are:
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
#endif
#if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t; //LINE 214 of stddef.h
#ifdef __BEOS__
typedef long ssize_t;
#endif /* __BEOS__ */
My system is linux, gcc -v is:
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.2.3
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.3
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.3/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.3/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-nls --with-system-zlib --disable-checking --disable-werror
--enable-secureplt --disable-libunwind-exceptions --disable-multilib
--enable-libmudflap --disable-libssp --disable-libgcj --with-arch=i686
--enable-languages=c,c++,treelang,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.2.3 (Gentoo 4.2.3 p1.0)
Any suggestions to the problem?
Cheers,
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
Sponsor ECS runners - Action against Hunger:
http://www.justgiving.com/ecsrunslikethewind
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Moving from 4.1.2 to 4.2.3 generates problems with size_t def.
2008-03-02 15:36 Moving from 4.1.2 to 4.2.3 generates problems with size_t def Paulo J. Matos
@ 2008-03-02 15:53 ` Paulo J. Matos
0 siblings, 0 replies; 2+ messages in thread
From: Paulo J. Matos @ 2008-03-02 15:53 UTC (permalink / raw)
To: help-gcc
Argh, I had a typo in the first line of the file before the comment section.
Forget it. Thanks,
Paulo Matos
On Sun, Mar 2, 2008 at 3:27 PM, Paulo J. Matos <pocm@soton.ac.uk> wrote:
> Hi all,
>
> I just moved from 4.1.2 to 4.2.3 and I am getting an error in my
> timemgm.c:16 file. Line 16 is the first non-comment line of the file
> with #include<stdlib.h> and I get:
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./include -D_GNU_SOURCE
> -Wall --std=c99 -Werror -g -O2 -MT dsat-timemgm.o -MD -MP -MF
> ".deps/dsat-timemgm.Tpo" -c -o dsat-timemgm.o `test -f 'timemgm.c' ||
> echo './'`timemgm.c; \
> then mv -f ".deps/dsat-timemgm.Tpo" ".deps/dsat-timemgm.Po"; else rm
> -f ".deps/dsat-timemgm.Tpo"; exit 1; fi
> In file included from /usr/include/stdlib.h:33,
> from timemgm.c:16:
> /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/include/stddef.h:214: error:
> expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
> In file included from timemgm.c:16:
> /usr/include/stdlib.h:140: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__ctype_get_mb_cur_max'
> In file included from timemgm.c:16:
> /usr/include/stdlib.h:455: error: expected declaration specifiers or
> '...' before 'size_t'
> /usr/include/stdlib.h:485: error: expected declaration specifiers or
> '...' before 'size_t'
> /usr/include/stdlib.h:487: error: nonnull argument with out-of-range
> operand number (argument 1, operand 4)
> /usr/include/stdlib.h:589: error: expected ')' before '__size'
> /usr/include/stdlib.h:591: error: expected ')' before '__nmemb'
> /usr/include/stdlib.h:600: error: expected declaration specifiers or
> '...' before 'size_t'
>
> Is there any reason for this?
> The lines around stddef.h:214 are:
> #ifndef __SIZE_TYPE__
> #define __SIZE_TYPE__ long unsigned int
> #endif
> #if !(defined (__GNUG__) && defined (size_t))
> typedef __SIZE_TYPE__ size_t; //LINE 214 of stddef.h
> #ifdef __BEOS__
> typedef long ssize_t;
> #endif /* __BEOS__ */
>
> My system is linux, gcc -v is:
> $ gcc -v
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with:
> /var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/configure
> --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.2.3
> --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/include
> --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.3
> --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.3/man
> --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.3/info
> --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/include/g++-v4
> --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
> --disable-nls --with-system-zlib --disable-checking --disable-werror
> --enable-secureplt --disable-libunwind-exceptions --disable-multilib
> --enable-libmudflap --disable-libssp --disable-libgcj --with-arch=i686
> --enable-languages=c,c++,treelang,fortran --enable-shared
> --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
> Thread model: posix
> gcc version 4.2.3 (Gentoo 4.2.3 p1.0)
>
> Any suggestions to the problem?
>
> Cheers,
>
> --
> Paulo Jorge Matos - pocm at soton.ac.uk
> http://www.personal.soton.ac.uk/pocm
> PhD Student @ ECS
> University of Southampton, UK
> Sponsor ECS runners - Action against Hunger:
> http://www.justgiving.com/ecsrunslikethewind
>
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
Sponsor ECS runners - Action against Hunger:
http://www.justgiving.com/ecsrunslikethewind
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-02 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-02 15:36 Moving from 4.1.2 to 4.2.3 generates problems with size_t def Paulo J. Matos
2008-03-02 15:53 ` Paulo J. Matos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).