As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [c11]

C11 refers to the ANSI C language standard finalized in 2011.

Filter by
Sorted by
Tagged with
16 votes
2 answers
2k views

Why were variable length arrays made optional in C 2011?

When VLAs were introduced in C 1999, I thought it was a great innovation to the language. However, having learned it was made optional in C 2011, I am wondering what led to its change in status, and ...
jxh's user avatar
  • 469
-3 votes
1 answer
230 views

Could ANSI C standardized linkage syntax from early C wrong? [closed]

Recently I came up to something illogical, reading the latest ANSI C paper. It was talking about linkage but it never mentioned a way to declare internal identifiers inside block-scope (or at least in ...
FISOCPP's user avatar
  • 147
0 votes
1 answer
206 views

Why are zero length VLAs allowed in C99, but not in C11 any more?

In the comments to this former question, there was a discussion if the C standard allows variable length arrays (VLAs) of length 0 or not. As it turns out, the C99 standard states: In 6.7.5.2 Array ...
Doc Brown's user avatar
  • 196k
0 votes
2 answers
647 views

Is it acceptable to use C11 generic macros in Objective-C to box numbers?

I was getting tired of repeating types when writing things like this: NSDictionary* d = @{@"so": [NSNumber numberWithInt:index]), @"much": [NSNumber numberWithBool:accepted]), ...
Craig Gidney's user avatar