fixinc/inclhack.def (avoid_wchar_t_type): New fix
Bruce Korb
bkorb@cruzio.com
Sat Nov 11 16:51:00 GMT 2000
Mark Mitchell wrote:
>
> >>>>> "Bruce" == Bruce Korb <bkorb@cruzio.com> writes:
>
> Bruce> Hi Mark,
>
> Bruce> Most likely, somebody, somewhere is going to end the
> Bruce> wchar_t typedef line with an incomplete comment. The
> Bruce> result will be that the ``#endif'' will be inside that
> Bruce> comment. I recommend that you delete the second
> Bruce> `c_fix_arg' and let fixincl default to using the select
> Bruce> clause. That will put the comment on the end of the #endif
> Bruce> line where it will do no harm. :-)
>
> I don't quite understand the full wonders of fixincludes. :-(
You're pretty close, though :-)
> Perhaps you would submit a patch? Since I simply ripped off the bool
> fix above, I assume that fix has the same problem?
Yes, it does. (Or, rather, would if someone had such a comment :)
Needless to say, I have stubbed my toe on this before....
--- inclhack.ori Sat Nov 11 17:47:05 2000
+++ inclhack.def Sat Nov 11 17:48:27 2000
@@ -764,9 +764,8 @@
c_fix = format;
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
- c_fix_arg = "^[ \t]*typedef[ \t].*[ \t]bool[ \t]*;.*";
- test_text = "typedef unsigned int\tbool \t; /* bool type */";
+ test_text = "typedef unsigned int\tbool \t; /* bool\n type */";
};
/*
@@ -781,9 +780,8 @@
c_fix = format;
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
- c_fix_arg = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;.*";
- test_text = "typedef unsigned short\twchar_t \t; /* wchar_t type */";
+ test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type
*/";
};
/*
More information about the Gcc-patches
mailing list