Switch to double if long preceeds it
authorRobert Pengelly <robertapengelly@hotmail.com>
Thu, 21 May 2026 16:40:48 +0000 (17:40 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Thu, 21 May 2026 16:40:48 +0000 (17:40 +0100)
parse.c

diff --git a/parse.c b/parse.c
index 199e2ee07c4b7a96dd13d00e9e496201f16a8a75..a3200bdae6f607d502191b2c234995d2075339c3 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -6857,7 +6857,12 @@ static void parse_type_spec (void) {
         
         } else if (tok.kind == TOK_DOUBLE) {
         
-            if (parsed_type_size == DATA_DOUBLE) {
+            if (parsed_type_size == DATA_LONG) {
+            
+                parsed_type_size = DATA_DOUBLE;
+                saw_double = 1;
+            
+            } else if (parsed_type_size == DATA_DOUBLE) {
                 report_line_at (get_filename (), get_line_number (), REPORT_ERROR, tok.start, tok.caret, "duplicate 'double'");
             } else if (parsed_type_size != DATA_NONE) {
                 report_line_at (get_filename (), get_line_number (), REPORT_ERROR, tok.start, tok.caret, "multiple data types in declaration specifiers");