ObjFW  Check-in [5591bf6a0b]

Overview
Comment:Fix compilation with older Clang versions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5591bf6a0b8acb046d8bbef502aeee0952e45cb6408f09ebe6d9ce75f59f1c97
User & Date: js on 2023-05-03 22:22:26
Other Links: manifest | tags
Context
2023-05-03
22:31
Make IPX sockets compile on FreeBSD 10 check-in: 01355ad851 user: js tags: trunk
22:22
Fix compilation with older Clang versions check-in: 5591bf6a0b user: js tags: trunk
2023-04-30
10:22
configure: Fix missing yes output check-in: 70a03ac466 user: js tags: trunk
Changes

Modified src/OFMethodSignature.m from [a3cd8a5fbd] to [e8f9b47dc1].

142
143
144
145
146
147
148

149
150
151
152
153
154
155
156
	(*type)++;
	(*length)--;

	return alignment;
}

static size_t

#if defined(__clang__) && __clang_major__ == 3 && __clang_minor__ <= 7
/* Work around an ICE in Clang 3.7.0 on Windows/x86 */
__attribute__((__optnone__))
#endif
alignmentOfEncoding(const char **type, size_t *length, bool inStruct)
{
	size_t alignment;








>
|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	(*type)++;
	(*length)--;

	return alignment;
}

static size_t
#if defined(__clang__) && __has_attribute(__optnone__) && \
    __clang_major__ == 3 && __clang_minor__ <= 7
/* Work around an ICE in Clang 3.7.0 on Windows/x86 */
__attribute__((__optnone__))
#endif
alignmentOfEncoding(const char **type, size_t *length, bool inStruct)
{
	size_t alignment;

436
437
438
439
440
441
442

443
444
445
446
447
448
449
450
	(*type)++;
	(*length)--;

	return size;
}

static size_t

#if defined(__clang__) && __clang_major__ == 3 && __clang_minor__ <= 7
/* Work around an ICE in Clang 3.7.0 on Windows/x86 */
__attribute__((__optnone__))
#endif
sizeOfEncoding(const char **type, size_t *length)
{
	size_t size;








>
|







437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
	(*type)++;
	(*length)--;

	return size;
}

static size_t
#if defined(__clang__) && __has_attribute(__optnone__) && \
    __clang_major__ == 3 && __clang_minor__ <= 7
/* Work around an ICE in Clang 3.7.0 on Windows/x86 */
__attribute__((__optnone__))
#endif
sizeOfEncoding(const char **type, size_t *length)
{
	size_t size;

Modified src/runtime/class.m from [5551b3027e] to [b47c784fc5].

776
777
778
779
780
781
782

783
784
785
786
787
788
789
790

	class->methodList = methodList;

	objc_updateDTable(class);
}

Method

#if defined(__clang__) && __clang_major__ == 3 && __clang_minor__ <= 7
/* Work around an ICE in Clang 3.7.0 on Windows/x86 */
__attribute__((__optnone__))
#endif
class_getInstanceMethod(Class class, SEL selector)
{
	Method method;
	Class superclass;







>
|







776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791

	class->methodList = methodList;

	objc_updateDTable(class);
}

Method
#if defined(__clang__) && __has_attribute(__optnone__) && \
    __clang_major__ == 3 && __clang_minor__ <= 7
/* Work around an ICE in Clang 3.7.0 on Windows/x86 */
__attribute__((__optnone__))
#endif
class_getInstanceMethod(Class class, SEL selector)
{
	Method method;
	Class superclass;