Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define gcc attributes inside gcc-attr.h
- Loading branch information
Showing
3 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 1998-2003, Darren Hiebert | ||
* | ||
* This source code is released for free distribution under the terms of the | ||
* GNU General Public License version 2 or (at your option) any later version. | ||
*/ | ||
|
||
/* This is derived from general.h. | ||
Only readtags related source file should include this. | ||
ctags related source file should include genera.h instead. */ | ||
|
||
#ifndef CTAGS_MAIN_GCC_ATTR_H | ||
#define CTAGS_MAIN_GCC_ATTR_H | ||
|
||
/* Prevent warnings about unused variables in GCC. */ | ||
#if defined (__GNUC__) && !defined (__GNUG__) | ||
# ifdef __MINGW32__ | ||
# define CTAGS_ATTR_UNUSED | ||
# else | ||
# define CTAGS_ATTR_UNUSED __attribute__((unused)) | ||
# endif | ||
# define CTAGS_ATTR_PRINTF(s,f) __attribute__((format (printf, s, f))) | ||
# define attr__noreturn __attribute__((__noreturn__)) | ||
#else | ||
# define CTAGS_ATTR_UNUSED | ||
# define CTAGS_ATTR_PRINTF(s,f) | ||
# define attr__noreturn | ||
#endif | ||
|
||
#endif /* CTAGS_MAIN_GCC_ATTR_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters