This is subjective but I don't see how this improves readability.  The
GA68_EXTRACT_* values are not an ordered set, the particular constant
values are basically arbitrary, and there is no logical sequence in
handling the different extracts.

> Signed-off-by: Mohammad-Reza Nabipoor <[email protected]>
>
> gcc/ChangeLog
>
>       * algol68/a68-exports.cc (a68_asm_output_extract): Re-order
>       cases in switch statement to be sorted based on the
>       GA68_EXTRACT_* values.
> ---
>  gcc/algol68/a68-exports.cc | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/gcc/algol68/a68-exports.cc b/gcc/algol68/a68-exports.cc
> index 375b6213cef..0a30edf5e74 100644
> --- a/gcc/algol68/a68-exports.cc
> +++ b/gcc/algol68/a68-exports.cc
> @@ -402,17 +402,17 @@ a68_asm_output_extract (const char *module_label, int 
> kind,
>        dw2_asm_output_data (1, GA68_EXTRACT_MODU, "module extract %s", 
> symbol);
>        a68_asm_output_string (symbol, "module indication");
>        break;
> -    case GA68_EXTRACT_MODE:
> -      dw2_asm_output_data (1, GA68_EXTRACT_MODE, "mode extract %s", symbol);
> -      a68_asm_output_string (symbol, "mode indication");
> -      dw2_asm_output_delta (PTR_SIZE, ASM_LABEL (mode), module_label, 
> "mode");
> -      break;
>      case GA68_EXTRACT_IDEN:
>        dw2_asm_output_data (1, GA68_EXTRACT_IDEN, "identifier extract %s", 
> symbol);
>        a68_asm_output_string (symbol, "name");
>        dw2_asm_output_delta (PTR_SIZE, ASM_LABEL (mode), module_label, 
> "mode");
>        encode_mdextra = true;
>        break;
> +    case GA68_EXTRACT_MODE:
> +      dw2_asm_output_data (1, GA68_EXTRACT_MODE, "mode extract %s", symbol);
> +      a68_asm_output_string (symbol, "mode indication");
> +      dw2_asm_output_delta (PTR_SIZE, ASM_LABEL (mode), module_label, 
> "mode");
> +      break;
>      case GA68_EXTRACT_PRIO:
>        dw2_asm_output_data (1, GA68_EXTRACT_PRIO, "prio extract %s", symbol);
>        a68_asm_output_string (symbol, "opname");

Reply via email to