Skip to contentSkip to conversation

gcc gas errors and vim

DISCUSSION Corey Holcomb-Hockin 2 participants 2 messages Nov 10, 2002

lore
Share & tools
lore
#0 lore raw

When I get a error assembling with gcc vim gets pointed to a temporary file with a random name that doesn't exist anymore instead of the actual source file. I wondered if there is a workaround or if I should give a bug report to gcc.

I'm using
gcc 2.95.4
gas 2.12.1
gmake 3.79.1
vim 6.1 with patches up to 183

this is some example output when I make in vim.

gcc -c -o main.o main.S
/tmp/ccXhsmV7.s: Assembler messages:
/tmp/ccXhsmV7.s:22: Error: suffix or operands invalid for `mul'
gmake: *** [main.o] Error 1

#1 lore raw
Quoted 4 lines

gcc -c -o main.o main.S
/tmp/ccXhsmV7.s: Assembler messages:
/tmp/ccXhsmV7.s:22: Error: suffix or operands invalid for `mul'
gmake: *** [main.o] Error 1

gcc understands a .S file to mean that the assembly program should be preprocessed first, so it stores the preprocessed output to a temporary file, with a .s suffix. Run your .S file through the preprocessor alone to check what's on line 22. (If you don't want your assembly file preprocessed then change the suffix to .s.)

b