www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - pragma alias

I still can't the "#pragma alias" directive to work in dmc 8.35.
E.g.

extern int foo;
extern int bar (void);

#pragma alias (foo, " foo")
#pragma alias (bar, " bar")

int main (void)
{
  foo = bar();
  return 0;
}

dmc -c foo.c, obj2asm foo.obj produces this:

FLAT    group
        ;alias  ?_foo ->  foo
        ;alias  ?_bar ->  bar
includelib SNN.lib
        extrn   __acrtused_con
        extrn   _foo
        extrn   _bar

        public  _main
_TEXT   segment
        assume  CS:_TEXT
_main:
                call    near ptr _bar
                mov     _foo,EAX
                xor     EAX,EAX
                ret

What's the ASCII 4 doing there?
Same if I produce an .exe. The 'foo' symbol shows as _foo in the .map-file.

-- 
Gisle V.

# rm /bin/laden
/bin/laden: Not found
Aug 29 2003