delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/18/18:51:28

From: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: assembler o/p with cpp source
Date: Fri, 15 Aug 1997 11:35:12 +0200
Organization: TU Chemnitz-Zwickau
Lines: 29
Message-ID: <33F422D0.1D1272BB@Mathematik.TU-Chemnitz.DE>
References: <1997Aug13 DOT 135917 DOT 17 AT river DOT tay DOT ac DOT uk>
NNTP-Posting-Host: prokyon.hrz.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

i96csm AT river DOT tay DOT ac DOT uk wrote:
> 
> Is there anyway to get gpp
> to produce assembly output WITH the C++ source code commented out
> (So it looks something like this)
> 
> ; void foo(void)
> ; {
> ;   int i,y;
> ;   i=10;
>     mov exp,%10
> ;   j=20;
>     move dxp,%10

Try the followin:

gcc -g -c -Wa,-ahl=foo.lst foo.c

This compiles foo.c and creates an assembler listing in
foo.lst which contains also the high level language lines.

Robert
-- 
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post:    Am Berg 3, D-09573 Dittmannsdorf                     *
* e-Mail:  Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE              *
* WWW:     http://www.tu-chemnitz.de/~rho                       *
*****************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019