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/subscripting.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 devdocs/gcc~13/subscripting.html (limited to 'devdocs/gcc~13/subscripting.html') diff --git a/devdocs/gcc~13/subscripting.html b/devdocs/gcc~13/subscripting.html new file mode 100644 index 00000000..a80e3b2e --- /dev/null +++ b/devdocs/gcc~13/subscripting.html @@ -0,0 +1,14 @@ +

6.23 Non-Lvalue Arrays May Have Subscripts

In ISO C99, arrays that are not lvalues still decay to pointers, and may be subscripted, although they may not be modified or used after the next sequence point and the unary ‘&’ operator may not be applied to them. As an extension, GNU C allows such arrays to be subscripted in C90 mode, though otherwise they do not decay to pointers outside C99 mode. For example, this is valid in GNU C though not valid in C90:

struct foo {int a[4];};
+
+struct foo f();
+
+bar (int index)
+{
+  return f().a[index];
+}
+
+

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

+
-- cgit v1.2.3