Skip to content

Commit b5fdec4

Browse files
committed
gcc: make fix std=gnu11
1 parent 99af740 commit b5fdec4

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

gcc/Makefile_params

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
PEDANTIC :=
2-
STD := gnu11
1+
CC_STD = gnu11
2+
PEDANTIC =

gcc/alloca.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Thus automatically deallocated when the function returns.
1414

1515
int f() {
1616
size_t size = 1 + (time(NULL) % 3);
17-
int *ip = alloca(size * sizeof(int));
17+
int *ip = (int *)alloca(size * sizeof(int));
1818
ip[0] = 1;
1919
return ip[0];
2020
}

gcc/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <alloca.h>
12
#include <assert.h> /* assert */
23
#include <complex.h> /* Complex integer types. */
34
#include <inttypes.h> /* intmax_t */
@@ -8,5 +9,4 @@
89
#include <stdlib.h> /* EXIT_SUCCESS */
910
#include <string.h>
1011
#include <time.h> /* time() */
11-
1212
#include <unistd.h> /* execl for sentinel attribute */

gcc/typeof.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
2-
# typeof
3-
4-
Like C++11 decltype.
5-
6-
Partially reproductible with C11 `_Generic`.
7-
8-
https://stackoverflow.com/questions/6513806/would-it-be-possible-to-add-type-inference-to-the-c-language/31709221#31709221
9-
*/
1+
/* # typeof
2+
*
3+
* Like C++11 decltype.
4+
*
5+
* Partially reproductible with C11 `_Generic`.
6+
*
7+
* https://stackoverflow.com/questions/6513806/would-it-be-possible-to-add-type-inference-to-the-c-language/31709221#31709221
8+
*/
109

1110
#include "common.h"
1211

File renamed without changes.

0 commit comments

Comments
 (0)