GCC Explorer - An Interactive Compiler
Written by Nikos Vaggalis   
Monday, 11 June 2012

An intuitive web based tool targeted at C++ programmers and useful for researching,debugging and optimizing code has been made available.

GCC Explorer is the brainchild of Matt Godbolt who explains his reasons for creating it in his blog:

One of the things I spend a fair amount of time doing at work is compiling my C/C++ code and looking at the disassembly output. Call me old-fashioned, but I think sometimes the only way to really grok your code is to see what the processor will actually execute. Particularly with some of the newer features of C++11 — lambdas, move constructors, threading primitives etc — it’s nice to be able to see how your elegant code becomes beautiful (and maybe even fairly optimal) machine code.

Having crafted a web-based tool for exploring the output of the compiler under small tweaks of the code, compiler version and compiler flags, Matt was given permission by his company to open source it.

ccomplier

 

The latest release of GCC Explorer has added more compilers GCC4.7, AVR, ARM, MSP to those available at launch. It now has filters to remove clutter such as unused labels, directives and extraneous comments from the generated assembler and permanent links are supported enabling users to generate a link to their examples. Security fixes also make it safer to run on publicly accessible websites.

 

To try it out go to http://gcc.godbolt.org/

If you know even a little assembler it is a great educational tool.
 

The code of GCC Explorer is available on github. 

 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner

 


Be Ready For Google I/O 2025
28/04/2025

Google has shared the agenda for its annual developer conference. This year Google will live stream two days of sessions, starting with the Keynote at 10:00 AM PT on May 20th, followed by the Dev [ ... ]



TSP - 81,998 Bars In South Korea Shortest Walking Tour
27/04/2025

It is a truth universally acknowledged that the Travelling Saleman Problem (TSP) is impossible to solve for even reasonably small examples using today's computers. Do we need powerful hardware or a qu [ ... ]


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

 

Last Updated ( Wednesday, 01 August 2018 )