From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/gcc~13/offsetof.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 devdocs/gcc~13/offsetof.html (limited to 'devdocs/gcc~13/offsetof.html') diff --git a/devdocs/gcc~13/offsetof.html b/devdocs/gcc~13/offsetof.html new file mode 100644 index 00000000..110e909e --- /dev/null +++ b/devdocs/gcc~13/offsetof.html @@ -0,0 +1,14 @@ +

6.53 Support for offsetof ΒΆ

GCC implements for both C and C++ a syntactic extension to implement the offsetof macro.

primary:
+        "__builtin_offsetof" "(" typename "," offsetof_member_designator ")"
+
+offsetof_member_designator:
+          identifier
+        | offsetof_member_designator "." identifier
+        | offsetof_member_designator "[" expr "]"
+

This extension is sufficient such that

#define offsetof(type, member)  __builtin_offsetof (type, member)
+

is a suitable definition of the offsetof macro. In C++, type may be dependent. In either case, member may consist of a single identifier, or a sequence of member accesses and array references.

+

+ © Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
+ https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Offsetof.html +

+
-- cgit v1.2.3