This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[CVS gcc] -Winline -Werror -O1 void return type variable size?




CVS gcc as of this morning. Alpha/linux.

/horton/bkoz/bld-alpha-egcs/gcc/gcc -B/horton/bkoz/bld-alpha-egcs/gcc/ -O1 kill.c -Winline -Werror -c

gives:
cc1: warnings being treated as errors
kill1.c: In function `atomic_add':
kill1.c:5: warning: function with varying-size return value cannot be inline


// kill.c 
typedef unsigned int    uint32_t;
static inline void
__attribute__ ((unused))
atomic_add (volatile uint32_t *mem, int val)
{
  register int result;

  __asm__ __volatile__ (
        "/* Inline exchange & add */\n"
        "1:\t"
        "ldl_l  %0,%2\n\t"
        "addl   %0,%3,%0\n\t"
        "stl_c  %0,%1\n\t"
        "beq    %0,2f\n\t"
        ".subsection 1\n"
        "2:\t"
        "br     1b\n"
        ".previous\n\t"
        "mb\n\t"
        "/* End exchange & add */"
        : "=&r"(result), "=m"(*mem)
        : "m" (*mem), "r"(val));
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]