This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GCC For Embedded!?


Hello...   ^o^

I develop embedded linux, I need smallest kernel and linux apps...

///////////////////////////////////////////////////////////////////////////////////////

/* File : test.c */
static void XYZ()
{
// The XYZ function code is very big...
}

static void test()
{
}

int main()
{
  test();

  return 1;
}
///////////////////////////////////////////////////////////////////////////////////////

# gcc -Wall -c test.c -o test
test.c:3: warning: `XYZ' defined but not used
///////////////////////////////////////////////////////////////////////////////////////

I find the ELF "test"...
When the very big function XYZ() is ever unused, but gcc still compiles
"XYZ" to "test"...

My god... I almost try all gcc command options, but "test" file still
has the very big function "XYZ"...

Anyone can help me!?   :~~~~~




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]