Sponsored Content
Full Discussion: Compiler considerations
Top Forums Programming Compiler considerations Post 302367540 by shamrock on Tuesday 3rd of November 2009 02:26:06 AM
Old 11-03-2009
Quote:
Originally Posted by MrUser
Hi this is rather basic question but to answer and understand the problem nedded expert.

compilers are OS dependent but OS may use any processor
Compilers are also MPU specific.
Quote:
Originally Posted by MrUser
how the compilers are able to generate code for different processors
They most likely have a database of the instruction set of each mpu.
Quote:
Originally Posted by MrUser
just consider the below scenario:



Code:
 
Compilers:              dev c/VC++                 gcc                  turbo 
 
OS:                        windows                    linux                  DOS 
 
Processors:                              intel/motorola/AMD/celeron


any processor i can use for any system.

if we consider gcc, it can generate code for intel or motorola or AMD on some other OS.
how its achieving this.
By knowing the instruction set of each mpu...easier for a software to remember but not for a programmer.
Quote:
Originally Posted by MrUser
what are the issues ( related to portability ) considered during the design of the compiler?

will they specify the set of processors that the compiler can generate the code for?
Yes they do.
Quote:
Originally Posted by MrUser
if so, they need to add the code for any newly invented processor.
Yes that would be called a newer version of the compiler.
 

5 More Discussions You Might Find Interesting

1. Programming

C compiler

I'm new to C but eager to get started. I purchasewd beginning C by Ivor Horton and realise that I need a C compiler. I looking for the most appropriate and economical way to obtain this, any suggestions would be greatly appreciated. (5 Replies)
Discussion started by: ferret
5 Replies

2. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

3. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 Replies

4. AIX

XL C/C++ Compiler

Hello, I am trying to use the IBM XL C/C++ Compiler on my AIX server. I have uised smit to install it and it appears to have been successful. When I however type XlC it tells me that I am still using my old compiler which is VisualAge C++ Professional / C for AIX Compiler, Version 5. How can I... (3 Replies)
Discussion started by: dkranes
3 Replies

5. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies
All times are GMT -4. The time now is 03:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy