Build everything as C++ (#1176)

This commit is contained in:
Rangi
2023-11-07 15:45:56 -05:00
committed by GitHub
parent 78d83be2b2
commit 1e70e703a7
84 changed files with 667 additions and 663 deletions

View File

@@ -9,9 +9,9 @@
#include <stdint.h>
#include <stdio.h>
#include "asm/lexer.h"
#include "asm/lexer.hpp"
#include "linkdefs.h"
#include "linkdefs.hpp"
struct FileStackNode {
struct FileStackNode *parent; // Pointer to parent node, for error reporting

View File

@@ -7,9 +7,9 @@
#include <stdbool.h>
#include <stdlib.h>
#include "asm/warning.h"
#include "asm/warning.hpp"
#include "helpers.h"
#include "helpers.hpp"
struct MacroArgs;

View File

@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdio.h>
#include "helpers.h"
#include "helpers.hpp"
extern bool haltNop;
extern bool warnOnHaltNop;

View File

@@ -5,7 +5,7 @@
#include <stdint.h>
#include "linkdefs.h"
#include "linkdefs.hpp"
struct Expression;
struct FileStackNode;

View File

@@ -6,7 +6,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "linkdefs.h"
#include "linkdefs.hpp"
#define MAXRPNLEN 1048576

View File

@@ -6,8 +6,8 @@
#include <stdint.h>
#include <stdbool.h>
#include "linkdefs.h"
#include "platform.h" // NONNULL
#include "linkdefs.hpp"
#include "platform.hpp" // NONNULL
extern uint8_t fillByte;

View File

@@ -8,9 +8,9 @@
#include <string.h>
#include <time.h>
#include "asm/section.h"
#include "asm/section.hpp"
#include "platform.h" // MIN_NB_ELMS
#include "platform.hpp" // MIN_NB_ELMS
#define MAXSYMLEN 255

View File

@@ -3,7 +3,7 @@
#ifndef WARNING_H
#define WARNING_H
#include "helpers.h"
#include "helpers.hpp"
extern unsigned int nbErrors;
@@ -77,7 +77,7 @@ void warning(enum WarningID id, char const *fmt, ...) format_(printf, 2, 3);
* It is also used when the assembler goes into an invalid state (for example,
* when it fails to allocate memory).
*/
_Noreturn void fatalerror(char const *fmt, ...) format_(printf, 1, 2);
[[noreturn]] void fatalerror(char const *fmt, ...) format_(printf, 1, 2);
/*
* Used for errors that make it impossible to assemble correctly, but don't