Please look at the interesting behavior of gcc


//a.c

int main(void)

{       

        print("Hello world\n");

        return 0;

}



//header.h

#include<stdio.h>



void print(char *);



void print(char *s)

{

        printf("%s",s);

}



[r...@localhost JAVA]# gcc a.c -include header.h

[r...@localhost JAVA]# ./a.out 

Hello world

[r...@localhost JAVA]# rm -f a.out

[r...@localhost JAVA]# gcc a.c --include header.h

[r...@localhost JAVA]# ./a.out 

Hello world

[r...@localhost JAVA]# rm -f a.out

[r...@localhost JAVA]# gcc a.c -includeheader.h

[r...@localhost JAVA]# ./a.out 

Hello world

[r...@localhost JAVA]# rm -f a.out

[r...@localhost JAVA]# gcc a.c --includeheader.h

cc1: error: unrecognized command line option "-fincludeheader.h"

[r...@localhost JAVA]#


-- 
           Summary: Unstable behavior of --include option with gcc
           Product: gcc
           Version: 3.4.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: RaghwendraKumar dot M at hcl dot in
  GCC host triplet: OS: CentOS(Linux localhost.localdomain 2.6.9-55.EL #1
                    Wed May 2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43059

Reply via email to