@@ -756,7 +756,9 @@ var_t *parse_global_constant_value(block_t *parent, basic_block_t **bb)
756
756
add_insn (parent , * bb , OP_load_constant , val , NULL , NULL , 0 , NULL );
757
757
} else if (lex_peek (T_string , NULL )) {
758
758
lex_accept (T_string );
759
- /* Strings not supported in struct fields */
759
+ /* TODO: String fields in structs not yet supported - requires proper
760
+ * handling of string literals as initializers
761
+ */
760
762
} else {
761
763
error ("Global array initialization requires constant values" );
762
764
}
@@ -3657,8 +3659,9 @@ bool read_global_assignment(char *token)
3657
3659
if (lex_peek (T_string , NULL )) {
3658
3660
/* String literal global initialization:
3659
3661
* String literals are now stored in .rodata section.
3660
- * TODO: Full support for global pointer initialization with
3661
- * rodata addresses requires compile-time address resolution.
3662
+ * TODO: Implement compile-time address resolution for global
3663
+ * pointer initialization with rodata addresses
3664
+ * (e.g., char *p = "str";)
3662
3665
*/
3663
3666
read_literal_param (parent , bb );
3664
3667
rs1 = opstack_pop ();
@@ -4801,7 +4804,9 @@ void read_global_decl(block_t *block, bool is_const)
4801
4804
lex_expect (T_semicolon );
4802
4805
return ;
4803
4806
} else if (lex_accept (T_comma )) {
4804
- /* TODO: Global variable continuation syntax not yet implemented */
4807
+ /* TODO: Implement global variable continuation syntax for multiple
4808
+ * declarations in single statement (e.g., int a = 1, b = 2;)
4809
+ */
4805
4810
error ("Global continuation not supported" );
4806
4811
} else if (lex_accept (T_semicolon )) {
4807
4812
opstack_pop ();
0 commit comments