Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3611354
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:51:57+00:00 2026-05-18T21:51:57+00:00

Does GCC/G++ have an option available to output analysis? It would be useful to

  • 0

Does GCC/G++ have an option available to output analysis?

It would be useful to be able to compare differences between the previous code with the new one (size, sizes of classes/structures). Those can then be diff’d with the previous output for comparison, which could be useful for many purposes.

If no such output analysis is available, what is the best way to obtain such information?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:51:58+00:00Added an answer on May 18, 2026 at 9:51 pm

    GCCXML is a (GCC variant) that dumps symbol and type declaration data in an XML format. That may or may not have the “properties” you care about in them.

    If you want specific information, you may be able to bend GCC to produce it. The learning curve for this is likely long and hard, because GCC wants to be a compiler, not a your-favorite-property-dumper, and it is a big, complex tool. You probably have some kind of chance with “struct size” as the compiler must compute that somewhere and it seems reasonable that it would be stored with information about the struct declaration. I’d expect that some of the command line switches do output some information and you might consider trying to emulate those. If you want really odd properties such as “register pressure inside a loop” you’ll have to reach deeply inside a compiler.

    If you want general properties derivable from the source code you will want to use a language-processing framework that has a strong C front end integrated into it. Clang is one. It likely has a learning curve similar to that for GCC, but is said to be better designed for tasks like yours. I have no specific experience with this.

    Our DMS Software Reengineering Toolkit is explicitly designed to support such tasks. It has a full C Front End, with APIs for building full parse trees, symbol tables relating identifiers to their point of declaration, actual type, and full control and data flow analysis. DMS also has a and a full C++ Front End, with similar properties, but it does not yet provide flow analysis information. DMS lets you write arbitrary code on top of this compute whatever (arbitrary property) you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know GCC compile time. Does GCC have any command or option
Does the Microsoft C# compiler (CSC.exe) have an option to output the Intermediate Language
Does anyone have experience with LLVM , llvm-gcc , or Clang ? The whole
The following code doesn't compile with gcc, but does with Visual Studio: template <typename
I have read about GCC's Options for Code Generation Conventions , but could not
I was told to use a disassembler. Does gcc have anything built in? What
gcc and AMD Open64 opencc both have a -s option to strip symbol table
I have a program that does not build with modern GCC with the foollowing
On a Unix system, where does gcc look for header files? I spent a
I know MSVC can do this via a pragma message -> http://support.microsoft.com/kb/155196 Does gcc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.