bug-gnu-utils
[Top][All Lists]
Advanced

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

issue with `diff -D`


From: Igor
Subject: issue with `diff -D`
Date: Wed, 21 Apr 2010 13:32:39 -0400

Ehllo.

I was trying to use `diff -D` to merge my multilib headers into one that would "#ifdef __x86_64__" everywere maintaining things correct. However i found this:

file a.h
   --- file a.h ---
   /* some comment
    */
int somefunc();
   --- end of file a.h ---

file b.h
   --- file b.h ---
   /* some DIFFERENT comment
    */

   int somefunc();
   --- end of file b.h ---

If I try to `diff -D __x86_64__ a.h b.h > c.h` i get this:

file c.h
   --- file c.h ---
   #ifndef __x86_64___
   /* some comment
   #else /* __x86_64__ */
   /* some DIFFERENT comment
   #endif /* __x86_64__ */
    */

   int somefunc();
   --- end of file c.h ---

getting a unclosed "#ifndef __x86_64__" messing stuff.

I don't know if this is a bug or if stuff was made simple since diff is not a C parser, however, reported.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]