Bug 36545 - Type _uleb128_t doesn't defined properly in /gcc/unwind-dw2.c
Summary: Type _uleb128_t doesn't defined properly in /gcc/unwind-dw2.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 01:40 UTC by Andrey
Modified: 2012-01-13 22:16 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-pc-mingw32/
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey 2008-06-16 01:40:42 UTC
Error output:

<<<<
In file included from ../../../gcc-4.3.1/libgcc/../gcc/unwind-dw2.c:41:
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:133: error: expected declaration specifiers or '...' before '_uleb128_t'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h: In function 'read_uleb128':
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:137: error: '_uleb128_t' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:137: error: (Each undeclared identifier is reported only once
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:137: error: for each function it appears in.)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:137: error: expected ';' before 'result'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:139: error: 'result' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:143: error: expected ')' before 'byte'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:148: error: 'val' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h: At top level:
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:155: error: expected declaration specifiers or '...' before '_sleb128_t'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h: In function 'read_sleb128':
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:159: error: '_uleb128_t' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:159: error: expected ';' before 'result'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:161: error: 'result' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:165: error: expected ')' before 'byte'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:172: error: expected ')' before numeric constant
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:174: error: 'val' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:174: error: '_sleb128_t' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:174: error: expected ';' before 'result'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h: In function 'read_encoded_value_with_base':
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:218: error: '_uleb128_t' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:218: error: expected ';' before 'tmp'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:219: error: 'tmp' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:219: error: too many arguments to function 'read_uleb128'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:226: error: '_sleb128_t' undeclared (first use in this function)
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:226: error: expected ';' before 'tmp'
../../../gcc-4.3.1/libgcc/../gcc/unwind-pe.h:227: error: too many arguments to function 'read_sleb128'
make[3]: *** [unwind-dw2.o] Error 1
make[3]: Leaving directory `/c/_Builds/gcc-4.3.1-mingw-build/i686-pc-mingw32/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/c/_Builds/gcc-4.3.1-mingw-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/c/_Builds/gcc-4.3.1-mingw-build'
make: *** [all] Error 2
>>>>

This is because type _uleb128_t doesn't properly defined in context of "/gcc/unwind-dw2.c" in sources of GCC. Type is defined in "unwind-generic.h" in the same directory, but at first - it doesn't included, at second - it declares guard define "_UNWIND_H" which already declared in "/mingw/lib/gcc/mingw32/3.4.5/include/unwind.h" and this file already included, so try to include "unwind-generic.h" just before "unwind-pe.h" in "unwind-dw2.c" anyway useless and could invoke different errors.
Comment 1 Andrew Pinski 2008-08-11 01:07:26 UTC
How did you configure GCC and how did you invoke make?
Comment 2 Andrey 2008-08-11 01:42:15 UTC
I don't know already. At now i have no this error.
Comment 3 Rob 2009-03-29 04:31:27 UTC
(In reply to comment #1)
> How did you configure GCC and how did you invoke make?

I am getting the exact same error on the Trunk for OpenBSD 4.5 .

# gmake
... (Errors)
# gcc/xgcc -v
Using built-in specs.
Target: i686-unknown-openbsd4.5
Configured with: /usr/src/gcc_trunk/configure --prefix=/home/usr/gcc_installed
--build=x86_64-unknown-openbsd4.5 --host=x86_64-unknown-openbsd4.5 
--targeti686-unknown-openbsd4.5 --enable-languages=c,c++,fortran,java,objc,obj-c++
--enable-multilib --disable-stage1-checking --enable-checking=release
--with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: single
gcc version 4.5.0 20090328 (experimental) [trunk revision 145157] (GCC)

Thanks,
Rob

Comment 4 Rob 2009-03-29 04:38:30 UTC
Another person has the same complaint as Andrey here:
http://www.mail-archive.com/gcc@gcc.gnu.org/msg23970.html
Comment 5 Andrew Pinski 2012-01-13 22:16:38 UTC
This has since been fixed so closing as such.