[Bug other/52168] fixinclude test failure for complex.h on netbsd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2014-11-16 Ever confirmed|0 |1 Severity|minor |normal
[Bug other/52168] fixinclude test failure for complex.h on netbsd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 Richard PALO changed: What|Removed |Added CC||richard at netbsd dot org --- Comment #9 from Richard PALO --- (In reply to Jonathan Wakely from comment #8) > priority -> minor because it doesn't really matter if a fixinclude for > Solaris doesn't work on netbsd, except for causing a test faulre Except that this issue is also present for solaris pkgsrc developers. +1 for the patch
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 Jonathan Wakely changed: What|Removed |Added Severity|normal |minor --- Comment #8 from Jonathan Wakely 2012-02-09 22:03:14 UTC --- priority -> minor because it doesn't really matter if a fixinclude for Solaris doesn't work on netbsd, except for causing a test faulre
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 Jonathan Wakely changed: What|Removed |Added Attachment #26633|0 |1 is obsolete|| --- Comment #7 from Jonathan Wakely 2012-02-09 21:58:24 UTC --- Created attachment 26634 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26634 group the i and d functions equivalent, but avoids repeating the context address by grouping the functions in braces also passes all tests on both gnu/linux and netbsd
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 --- Comment #6 from Jonathan Wakely 2012-02-09 21:31:48 UTC --- Created attachment 26633 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26633 replace 'c' command with 'i' and 'd' this passes the tests on gnu/linux and netbsd
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 --- Comment #5 from Jonathan Wakely 2012-02-09 12:24:14 UTC --- (In reply to comment #4) > netbsd does too (but I can't test that until later today) or rather, it doesn't ignore the newline, but it does produce the expected result
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 --- Comment #4 from Jonathan Wakely 2012-02-09 12:19:38 UTC --- NetBSD PR http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45955 My analysis of the problem was incorrect and it looks as though a fix would be to put an *unescaped* \n at the end of each -e script: /* * Fix Command Arguments for Solaris_Complex_Cxx */ static const char* apzSolaris_Complex_CxxPatch[] = { sed_cmd_z, "-e", "/#if[ \t]*!defined(__cplusplus)/c\\\n\ #ifdef\t__cplusplus\\\n\ extern \"C\" {\\\n\ -#endif", +#endif\n", "-e", "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n\ #ifdef\t__cplusplus\\\n\ }\\\n\ -#endif", +#endif\n", (char*)NULL }; POSIX requires that a newline in the replacement text be escaped with \ so an unescaped newline is not part of the replacement text. GNU and Solaris both correctly ignore an unescaped newline at the end of the script, apparently netbsd does too (but I can't test that until later today)
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org, ||korbb at gcc dot gnu.org --- Comment #3 from Jakub Jelinek 2012-02-09 09:20:21 UTC --- This isn't the only issue we had with sed c command, see http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01110.html And this is the only spot in fixincl that uses it. Can't it be rewritten with without sed somehow (c_test/c_fix* ?)?
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 --- Comment #2 from Jonathan Wakely 2012-02-09 00:37:58 UTC --- The problem is that netbsd's sed doesn't put a newline after a 'c' command, so the two 'endif' here (from fixincl.x) don't get newlines after them: /* * Fix Command Arguments for Solaris_Complex_Cxx */ static const char* apzSolaris_Complex_CxxPatch[] = { sed_cmd_z, "-e", "/#if[ \t]*!defined(__cplusplus)/c\\\n\ #ifdef\t__cplusplus\\\n\ extern \"C\" {\\\n\ #endif", "-e", "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n\ #ifdef\t__cplusplus\\\n\ }\\\n\ #endif", (char*)NULL }; With GNU sed: $ { echo foo ; echo bar ; } | sed '/foo/c\ baz' baz bar But with netbsd sed: $ { echo foo ; echo bar ; } | sed '/foo/c\ baz' bazbar
[Bug other/52168] fixinclude test failure for complex.h on netbsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168 --- Comment #1 from Richard Guenther 2012-02-08 10:19:50 UTC --- Weird original formatting in complex.h