We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbe12ad commit c37b420Copy full SHA for c37b420
SingleSource/Regression/C++/custom_section_members.cpp
@@ -1,8 +1,13 @@
1
// Test that we can compile a simple class with members in a custom section.
2
+#if defined(__APPLE__)
3
+#define SECTNAME "__TEXT,__section"
4
+#else
5
+#define SECTNAME "section"
6
+#endif
7
8
struct A {
- static int foo() __attribute__((section("section")));
- static void bar() __attribute__((section("section")));
9
+ static int foo() __attribute__((section(SECTNAME)));
10
+ static void bar() __attribute__((section(SECTNAME)));
11
};
12
13
int A::foo() { return 0; }
0 commit comments