Skip to contentSkip to conversation

gcc compiler modification to cater for new programming language

DISCUSSION Chris Jones 4 participants 5 messages Jun 10, 2012 – Jun 13, 2012

lore
Share & tools
lore
#0 lore raw

Is it possible to modify the source code of gcc to enable to compilation of a completely new programming language, as yet unrecognized? How much of a big job would I be looking at for such a task?

Regards

Signature · 6 lines
		Chris Jones

OpenSUSE Linux x86_64 (PC)|Android (Smartphone)|Windows x86 (Gaming!)
Kernel developer|Lead Developer of SDL|Lead Developer of Nest Linux|Gamer and Emulator nut|Web Services|Digital Imaging Services
Controllers: Logitech Precision|PS3 controller|XB360 controller|Logitech Attack 3 j/stick
Emulators: Fusion|Gens|ZSNES|Project64|PCSX-R|Stella|WinVICE|WinUAE
#1 lore raw
Quoted 3 lines · Chris Jones

Is it possible to modify the source code of gcc to enable to compilation of a completely new programming language, as yet unrecognized? How much of a big job would I be looking at for such a task?

Yeah, you need to write a gcc front-end for it.

But this is totally off-topic in LKML, you need to go to gcc mailing list.

#2 lore raw
In reply to Cong Wang
Quoted 7 lines · Cong Wang
Quoted 3 lines · Chris Jones

Is it possible to modify the source code of gcc to enable to compilation of a completely new programming language, as yet unrecognized? How much of a big job would I be looking at for such a task?

Yeah, you need to write a gcc front-end for it.

Why would you suggest writing a front-end for it? I think you're wrong there as a front-end has nothing to do with the functionality of gcc. Explain to me why you would suggest this? Curious.

I am aware it is off-topic and have also brought it up on the gcc mailing list, thanks.

Regards

Signature · 6 lines
		Chris Jones

OpenSUSE Linux x86_64 (PC)|Android (Smartphone)|Windows x86 (Gaming!)
Kernel developer|Lead Developer of SDL|Lead Developer of Nest Linux|Gamer and Emulator nut|Web Services|Digital Imaging Services
Controllers: Rapier V2 Gaming mouse|Logitech Precision|PS3 controller|XB360 controller|Logitech Attack 3 j/stick
Emulators: Fusion|Gens|ZSNES|Project64|PCSX-R|Stella|WinVICE|WinUAE
#3 lore raw
Quoted 1 line · Chris Jones

Cong Wang wrote:

[...]

Quoted 3 lines
Quoted 1 line

Yeah, you need to write a gcc front-end for it.

Why would you suggest writing a front-end for it? I think you're wrong

Because that's the right thing to do?!

Quoted 2 lines

there as a front-end has nothing to do with the functionality of gcc. Explain to me why you would suggest this? Curious.

Get a basic course in compiler-contruction and learn, what "frontend" and "backend" in a compiler are.
But you could also write a parser which parses the new/other programming language and produces C which in turn can be compiled a an unpatched gcc.

Quoted 1 line

I am aware it is off-topic and have also brought it up on the gcc

Then why are you posting it anyways?

Bernd

Signature · 2 lines
Bernd Petrovitsch                  Email : [email protected]
                     LUGA : http://www.luga.at