From: Matt Birkholz Date: Fri, 19 Apr 2013 19:26:54 +0000 (-0700) Subject: Add (unused) attribute to Rdl. X-Git-Tag: release-9.2.0~188 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4ce74a627ebae958c8b59edbc0c69aa0cfd3bdef;p=mit-scheme.git Add (unused) attribute to Rdl. This eliminates LAIR/C build log noise to the tune of 70,000 lines! --- diff --git a/src/compiler/machines/C/cout.scm b/src/compiler/machines/C/cout.scm index 2f9d012d5..d8acaff1a 100644 --- a/src/compiler/machines/C/cout.scm +++ b/src/compiler/machines/C/cout.scm @@ -248,7 +248,7 @@ USA. (c:decl 'sobj* 'current_block) (c:scall "DECLARE_VARIABLES") ;; dlink is initialized right before perform_dispatch. - (c:decl 'sobj* (c:dlink-reg)) + (c:decl-unused 'sobj* (c:dlink-reg)) (register-declarations) extra-decls (c:line) diff --git a/src/compiler/machines/C/cutl.scm b/src/compiler/machines/C/cutl.scm index 5807957c2..5c1c43923 100644 --- a/src/compiler/machines/C/cutl.scm +++ b/src/compiler/machines/C/cutl.scm @@ -398,6 +398,11 @@ USA. (if (default-object? val) "" (string-append " = " (c:expr val))) ";")) +(define (c:decl-unused type var #!optional val) + (c:line (c:type type) " " (c:var var) + (if (default-object? val) "" (string-append " = " (c:expr val))) + " ATTRIBUTE((unused));")) + (define (c:var item) (cond ((string? item) item) ((symbol? item) (symbol-name item)) diff --git a/src/microcode/liarc.h b/src/microcode/liarc.h index ae5b75fee..554a38bee 100644 --- a/src/microcode/liarc.h +++ b/src/microcode/liarc.h @@ -49,12 +49,7 @@ USA. extern SCHEME_OBJECT * sp_register; -#ifdef __GNUC__ -/* Add attributes to avoid warnings from -Wall for unreferenced labels */ -# define DEFLABEL(name) name : __attribute__((unused)) -#else -# define DEFLABEL(name) name : -#endif +#define DEFLABEL(name) name : ATTRIBUTE((unused)) union machine_word_u {