[cfe-dev] Pre-processing assembly sources

Martin J. O'Riordan via cfe-dev cfe-dev at lists.llvm.org
Fri Jul 29 06:01:13 PDT 2016


When I use ‘-std=*’ I get an error reporting that the ‘.S’ is not a C or C++ program.  So I assume that the default therefore is C89 (C90)?

 

I’m actually using it as follows:

 

clang -c foo.S

 

to directly create the ‘.o’.

 

Thanks,

 

            MartinO

 

From: mats.o.petersson at googlemail.com [mailto:mats.o.petersson at googlemail.com] On Behalf Of mats petersson
Sent: 29 July 2016 11:58
To: Martin J. O'Riordan
Cc: Clang Dev
Subject: Re: [cfe-dev] Pre-processing assembly sources

 

Assuming you do something like clang -E foo.S > foo.s it uses the default for the compiler. If you want a specific language standard, use the -std=c99 or -std=c11.

Or are you doing something different from that?

--

Mats

 

On 29 July 2016 at 11:32, Martin J. O'Riordan via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org> > wrote:

Using the C pre-processor for maintaining assembly source files is really useful, but which ISO C Standard pre-processor is selected when pre-processing files with the extension ‘.S’?

 

Thanks,

 

            MartinO

 


_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org> 
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160729/14fe61c1/attachment.html>


More information about the cfe-dev mailing list