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

Bug#342126: marked as done ([PR28318] Function names starting with $ make assembler barf)



Your message dated Wed, 30 Jan 2008 19:33:35 +0100
with message-id <18336.49919.80828.56765@gargle.gargle.HOWL>
and subject line [PR28318] Function names starting with $ make assembler barf
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gcc-4.0
Version: 4.0.2-5
Severity: normal

When I compile the following simple code, gcc fails with:
/tmp/ccySlj9q.s: Assembler messages:
/tmp/ccySlj9q.s:56: Error: missing or invalid immediate expression `' taken as 0
/tmp/ccySlj9q.s:56: Error: suffix or operands invalid for `call'

I've ran gcc -S in the code and I found a "call $" in the compiled code for parse_cmd.

Here is the code:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

struct sstate {
 int daemon;
 int run;
 int level;
 struct timespec sleep;
 int sleep_h;
 int max_level;
 int min_level;
 int total_states;
};

typedef struct sstate tstate;
static int parse_cmd(char *argv[], int argc, tstate *state) {
 int i = 1;
 while (i < argc) {
   char *op = argv[i++];
   if (strcmp(op, "-i") == 0) {
     if (i >= argc || sscanf(argv[i++], "%d", $(state->sleep_h)) != 1) {
       return 0;
     }
   } else if (strcmp(op, "-h") == 0) {
     if (i >= argc || sscanf(argv[i++], "%d", &state->max_level) != 1) {
       return 0;
     }
   } else if (strcmp(op, "-l") == 0) {
     if (i >= argc || sscanf(argv[i++], "%d", &state->min_level) != 1) {
       return 0;
     }
   } else if (strcmp(op, "-f") == 0) {
     state->daemon = 0;
   } else {
     return 0;
   }
 }
 return 1;
}

tstate state;

int main(int argc, char *argv[]) {
 if (! parse_cmd(argv, argc, &state)) {
   exit(1);
 }
 return 0;
}



-- System Information:
Debian Release: testing/unstable
 APT prefers unstable
 APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-k7
Locale: LANG=pt_BR, LC_CTYPE=pt_BR (charmap=ISO-8859-1)

Versions of packages gcc-4.0 depends on:
ii binutils 2.16.1cvs20051117-1 The GNU assembler, linker and bina
ii  cpp-4.0              4.0.2-5             The GNU C preprocessor
ii gcc-4.0-base 4.0.2-5 The GNU Compiler Collection (base ii libc6 2.3.5-8.1 GNU C Library: Shared libraries an
ii  libgcc1              1:4.0.2-5           GCC support library

Versions of packages gcc-4.0 recommends:
ii libc6-dev 2.3.5-8.1 GNU C Library: Development Librari
pn  libmudflap0-dev               <none>     (no description available)

-- no debconf information



--- End Message ---
--- Begin Message ---
Fixed with current binutils package.


--- End Message ---

Reply to: