Can I force Visual Studio Express C++ .NET to build ANSI C only?

beer

Lifer
Jun 27, 2000
11,169
1
0
I have a class in computer architecture. First lab is to write an assembler. VS C++ .NET seems to build C code fine, but he specifically says 'if this doesnt compile on gcc your code will be returned to you.' Is there a way to force literal ANSI C on VS C++ .NET?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Build and test in VS.NET, then build and test in GCC. AFAIK there's no way to force VS to enforce ANSI C standards.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: notfred
Why would you use VS if the class requires gcc?

As long as you're careful, you can write code that will compile in both. VS debugging tools are the main reason that I started my projects there. Of course, you have to test for GCC compatibility when you are finished, but the code changes should be minor at best.
 

beer

Lifer
Jun 27, 2000
11,169
1
0
Originally posted by: notfred
Why would you use VS if the class requires gcc?

Because I have never used GDB and I'm not sure is writing an assembler is a task I want to learn a new debugger on.
 

vtqanh

Diamond Member
Jan 4, 2001
3,100
0
76
If you code everything carefully and follow ANSI C standard, you shouldnt have any problem. Make sure you compile it in GCC to make sure it compiles correctly