You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[1mtests/compile_time/add_int_to_string.c:4:17: [0m[0;1;35mwarning: [0m[1madding 'int' to a string does not append to the string [-Wstring-plus-int][0m
1
+
tests/compile_time/add_int_to_string.c:4:17: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
2
2
printf("hello" + argc);
3
-
[0;1;32m ~~~~~~~~^~~~~~
4
-
[0m[1mtests/compile_time/add_int_to_string.c:4:17: [0m[0;1;30mnote: [0muse array indexing to silence this warning[0m
3
+
~~~~~~~~^~~~~~
4
+
tests/compile_time/add_int_to_string.c:4:17: note: use array indexing to silence this warning
5
5
printf("hello" + argc);
6
-
[0;1;32m ^
7
-
[0m[0;32m & [ ][0m
6
+
^
7
+
& [ ][0m
8
8
dcc explanation: Careful, you can't concatenate values and strings in C using the `+` operator, as you seem to be trying to do on line 4 of `tests/compile_time/add_int_to_string.c`.
9
9
Odds are you want to provide `printf` with a format code for that value and pass that value to `printf` as an argument.
[1mtests/compile_time/array_static_illegal_index.c:3:2: [0m[0;1;35mwarning: [0m[1marray index 5 is past the end of the array (which contains 5 elements) [-Warray-bounds][0m
1
+
tests/compile_time/array_static_illegal_index.c:3:2: warning: array index 5 is past the end of the array (which contains 5 elements) [-Warray-bounds]
tests/compile_time/array_static_illegal_index.c:2:2: note: array 'a' declared here
5
5
int a[5];
6
-
[0;1;32m ^[0m
6
+
^[0m
7
7
dcc explanation: Careful, on line 3 of `tests/compile_time/array_static_illegal_index.c`, it looks like you're trying to access location 5 of `a`, which doesn't exist; `a` isn't that long.
[1mtests/compile_time/array_string_index.c:3:3: [0m[0;1;31merror: [0m[1marray subscript is not an integer[0m
1
+
tests/compile_time/array_string_index.c:3:3: error: array subscript is not an integer
2
2
a["0"] = 0;
3
-
[0;1;32m ^~~~[0m
3
+
^~~~
4
4
dcc explanation: Looks like you're trying to access an element of the array `a` on line 3 of `tests/compile_time/array_string_index.c`, but your index (`"0"`) is not of type `int`.
5
5
Right now, your index is of type `string` instead.
6
6
Make sure your index (the value between square brackets) is an `int`.
dcc explanation: it looks like there is a missing closing bracket on the assert on line 5 of tests/extracted_compile_time_tests/assert_without_closing_parenthesis.c
[1mtests/extracted_compile_time_tests/assign_array_to_int.c:4:10: [0m[0;1;35mwarning: [0m[1mincompatible pointer to integer conversion assigning to 'int' from 'int [3]' [-Wint-conversion][0m
1
+
tests/extracted_compile_time_tests/assign_array_to_int.c:4:10: warning: incompatible pointer to integer conversion assigning to 'int' from 'int [3]' [-Wint-conversion]
2
2
a[0][0] = a[1];
3
-
[0;1;32m ^ ~~~~[0m
3
+
^ ~~~~
4
4
dcc explanation: you are attempting to assign a[1] which is an array to an int variable.
0 commit comments