nasm/compiler.h
H. Peter Anvin c1494ac5ab Macroize any compiler-specific code; macros defined in "compiler.h"
Move anything compiler-specific to "compiler.h".

There was an unguarded use of __attribute__(()) in outmacho.c; also
require gcc 4+ for __builtin_ctlz().  Speed up the open-coded version, too.
2007-04-13 19:58:42 +00:00

36 lines
780 B
C

/* ----------------------------------------------------------------------- *
*
* Copyright 2007 The NASM Authors - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the license given in the file "License"
* distributed in the NASM archive.
*
* ----------------------------------------------------------------------- */
/*
* compiler.h
*
* Compiler-specific macros for NASM. Feel free to add support for
* other compilers in here.
*/
#ifndef COMPILER_H
#define COMPILER_H
#ifdef __GNUC__
# if __GNUC__ >= 4
# define HAVE_GNUC_4
# endif
# if __GNUC__ >= 3
# define HAVE_GNUC_3
# endif
#endif
#ifdef __GNUC__
# define _unused __attribute__((unused))
#else
# define _unused
#endif
#endif