Re: kerne-2.4.0-test13pre3 with gcc-2.97

2 messages, 2 authors, 2000-12-26 · open the first message on its own page

Re: kerne-2.4.0-test13pre3 with gcc-2.97

From: Alexandre Oliva <hidden>
Date: 2000-12-24 18:08:08

On Dec 24, 2000, Thomas Sailer [off-list ref] wrote:
Alexandre Oliva wrote:
quoted
This change (and apparently all other changes you've made) are
definitely wrong.  Zero-sized arrays as the last element of a
structure used to be an extension in GCC 2.95.2, that has been adopted
by C99 with a slightly different syntax, that GCC CVS supports: just
remove the `0' from between the braces.
Which is not backward compatible, unfortunately.
Indeed.  I wish we had maintained the old syntax for
backward-compatibility, even if with a deprecation warning.

--
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

how to use macro in assemble language embedded in C?

From: kerler <hidden>
Date: 2000-12-26 01:41:09

hello,

When i use the assemble language embedded in C, how can i use the macro?

in the following code, i want to use the macro PT_R16 defined in
asm\ptrace.h.

=========temp.c==========
asm("#include <asm\\ptrace.h>\n\t");
void dummy (void)
{
    asm("stwu   %r1, -PT_R16(%r1)");             /* stack */
}
=========end of temp.c===

when i
      gcc -c temp.c
error message:
/tmp/cc8ztvPf.s: Assembler messages:
/tmp/cc8ztvPf.s:13: Error: Negative of non-absolute symbol PT_R16

if use
      gcc -S temp.c
the file temp.s is:

=========temp.s==========
        .file   "temp.c"
gcc2_compiled.:
        #include <asm\ptrace.h>

        .section        ".text"
        .align 2
        .globl dummy
        .type    dummy,@function
dummy:
        stwu 1,-16(1)
        stw 31,12(1)
        mr 31,1
        stwu   %r1, -PT_R16(%r1)
.L2:
        lwz 11,0(1)
        lwz 31,-4(11)
        mr 1,11
        blr
.Lfe1:
        .size    dummy,.Lfe1-dummy
        .ident  "GCC: (GNU) 2.95.2 20000220 (Debian GNU/Linux)"
======end of temp.s=============


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help