RE: How to suppress warning?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lyle Taylor wrote: 

> Why is it that the preprocessor and compiler can't just be smart
> enough to handle it?

I think they do, they just warn anyway.

My quick test attached; looks fine on 2.95-3.4.

Rup.
#include <stdio.h>

int main(void)
{
printf("I'm a little teapot\n");
#include "teapot.h"
printf("short and stout\n");
printf("here's my handle\n");
#include "teapot2.h"
printf("here's my spout\n");
return 0;
}
//empty header, no newline at end of file

//
#ifndef _H_TEAPOT2
#define _H_TEAPOT2

// no newline at end of file

#endif

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux