aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/doxygen-gcc-ice.patch
blob: fbfedcb7abc990bcc840ad3848599067ef243a00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Work around this GCC ICE: <https://bugs.gnu.org/31708>.  It shows up
only when doing native compiles on armhf-linux.

Yes it's a terrible patch, but it does the job.

--- doxygen-1.8.13/qtools/qutfcodec.cpp	1970-01-01 01:00:00.000000000 +0100
+++ doxygen-1.8.13/qtools/qutfcodec.cpp	2018-06-08 14:14:29.614009929 +0200
@@ -189,7 +189,7 @@ int QUtf16Codec::heuristicContentMatch(c
 }
 
 
-
+volatile const void *bomPointer = &QChar::byteOrderMark;
 
 class QUtf16Encoder : public QTextEncoder {
     bool headerdone;
@@ -209,7 +209,7 @@ public:
 	    headerdone = TRUE;
 	    len_in_out = (1+uc.length())*(int)sizeof(QChar);
 	    QCString d(len_in_out);
-	    memcpy(d.rawData(),&QChar::byteOrderMark,sizeof(QChar));
+	    memcpy(d.rawData(),(void *)bomPointer,sizeof(QChar));
 	    memcpy(d.rawData()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar));
 	    return d;
 	}