diff options
author | Alan Modra <amodra@gmail.com> | 2023-02-10 18:03:35 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-02-10 18:07:49 +1030 |
commit | fe8cdc8ec145a166414fc375cf2cb65d9a8085a1 (patch) | |
tree | 7e9aec7c2d7bafcbbcf78d7d03e45d7c4384456f /gas | |
parent | aa1807419ba0b6fa4a8b497babc1c89b27e667e5 (diff) | |
download | binutils-fe8cdc8ec145a166414fc375cf2cb65d9a8085a1.zip binutils-fe8cdc8ec145a166414fc375cf2cb65d9a8085a1.tar.gz binutils-fe8cdc8ec145a166414fc375cf2cb65d9a8085a1.tar.bz2 |
Local label checks in integer_constant
"Local labels are never absolute" says the comment. Except when they
are. Testcase
.offset
0:
a=0b
I don't see any particular reason to disallow local labels inside
struct definitions, so delete the comment and assertions.
* expr.c (integer_constant): Delete local label assertions.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/expr.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -573,10 +573,6 @@ integer_constant (int radix, expressionS *expressionP) symbolP = symbol_find (name); if ((symbolP != NULL) && (S_IS_DEFINED (symbolP))) { - /* Local labels are never absolute. Don't waste time - checking absoluteness. */ - know (SEG_NORMAL (S_GET_SEGMENT (symbolP))); - expressionP->X_op = O_symbol; expressionP->X_add_symbol = symbolP; } @@ -604,11 +600,6 @@ integer_constant (int radix, expressionS *expressionP) name = fb_label_name (number, 1); symbolP = symbol_find_or_make (name); /* We have no need to check symbol properties. */ -#ifndef many_segments - /* Since "know" puts its arg into a "string", we - can't have newlines in the argument. */ - know (S_GET_SEGMENT (symbolP) == undefined_section || S_GET_SEGMENT (symbolP) == text_section || S_GET_SEGMENT (symbolP) == data_section); -#endif expressionP->X_op = O_symbol; expressionP->X_add_symbol = symbolP; expressionP->X_add_number = 0; |