Bug in gcc 4.0.2?

Guest #1171123
Hello all,

I'm confused at the moment. I work with WinARM Version 20060125. This
Version contained the gcc 4.0.2.

When I try to compile follows then an big endian binary is the result.
Thats expected and correct:

@arm-elf-gcc -c -mcpu=arm7tdmi -T../system_source/TMS470R1B1M-RAM.ld
-T../system_source/reg_map.ld -Wall
-Wextra -Wshadow -Wpointer-arith -Wcast-align -Wsign-compare
-Waggregate-return -Wunused -D RUN_FROM_RAM
-D GCC_ARM7 -I. -I.. -I../include -g -O0 -mbig-endian -v
-Wbad-function-cast -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations
BinFram.c -o BinFram.o


And now my confusion. When I try to compile follows it was created a
little endian binary. And this isn't expected. Is it a bug in the gcc?
The only one difference is that the source file is located in an
underlayed folder.

@arm-elf-gcc -c -mcpu=arm7tdmi -T../system_source/TMS470R1B1M-RAM.ld
-T../system_source/reg_map.ld -Wall
-Wextra -Wshadow -Wpointer-arith -Wcast-align -Wsign-compare
-Waggregate-return -Wunused -D RUN_FROM_RAM
-D GCC_ARM7 -I. -I.. -I../include -g -O0 -mbig-endian -v
-Wbad-function-cast -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations
BinFram/BinFram.c -o BinFram/BinFram.o

I'm very happy for each hint.

Regards,
Karsten
Guest #1171124
Hello again,

also tests with WinARM Version 20060331 and the gcc 4.1.0 produced the
same results. :-(

Regards,

Karsten

Reply

A question of your own? This thread is over 20 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.