Skip to content

Commit 434f1f3

Browse files
committed
Add a comment about signedness of 'char'
1 parent e523a43 commit 434f1f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cfront.c

+7
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,13 @@ token_t get_next_token()
446446
}
447447

448448
/* end of file */
449+
/* "FIXME: The signedness of 'char' in the C programming language is indeed
450+
* implementation-specific. For example, gcc for Arm treats 'char' as
451+
* unsigned, while gcc for x86(-64) treats 'char' as signed. The warning
452+
* below is raised in gcc for Arm:
453+
* warning: comparison is always false due to limited range of data type
454+
* [-Wtype-limits]
455+
*/
449456
if ((next_char == 0) || (next_char == -1))
450457
return T_eof;
451458

0 commit comments

Comments
 (0)