We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e5cc94c + 9624314 commit 7163605Copy full SHA for 7163605
src/parser.c
@@ -2084,6 +2084,13 @@ bool read_global_assignment(char *token)
2084
var = find_global_var(token);
2085
if (var) {
2086
if (lex_peek(T_string, NULL)) {
2087
+ /* FIXME: Current implementation lacks of considerations:
2088
+ * 1. string literal should be stored in .rodata section of elf
2089
+ * 2. this does not respect the variable type, if var is char *,
2090
+ * then simply assign the data address of string literal,
2091
+ * otherwise, if var is char[], then copies the string and
2092
+ * mutate the size of var here.
2093
+ */
2094
read_literal_param(parent, bb);
2095
rs1 = opstack_pop();
2096
vd = var;
0 commit comments