Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22246

When c macros are expanded why does the code get so big?

$
0
0

I've been experimenting with C's macros, and decided to expand them to see the replacement. When I supply gcc with -E, I get 800 lines of code just for this simple code:

#include <stdio.h>#define TEN 10int main(void) {    printf("hello world %d", TEN);    return 0;}

My questions:

  • Why do I get so many lines!?
  • How can C run so fast with that many lines?
  • Is that many lines a problem?

Viewing all articles
Browse latest Browse all 22246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>