Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
cd6c5cfd
Commit
cd6c5cfd
authored
Nov 28, 2014
by
Max Kellermann
Committed by
Max Kellermann
Aug 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler.h: exclude clang from GCC_CHECK_VERSION()
parent
b855f2fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Compiler.h
src/Compiler.h
+7
-2
AllocatedPath.cxx
src/fs/AllocatedPath.cxx
+1
-1
No files found.
src/Compiler.h
View file @
cd6c5cfd
...
@@ -28,8 +28,13 @@
...
@@ -28,8 +28,13 @@
#define GCC_VERSION 0
#define GCC_VERSION 0
#endif
#endif
/**
* Are we building with the specified version of gcc (not clang or any
* other compiler) or newer?
*/
#define GCC_CHECK_VERSION(major, minor) \
#define GCC_CHECK_VERSION(major, minor) \
(defined(__GNUC__) && GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
(defined(__GNUC__) && !defined(__clang__) && \
GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
/**
/**
* Are we building with clang (any version) or at least the specified
* Are we building with clang (any version) or at least the specified
...
@@ -138,7 +143,7 @@
...
@@ -138,7 +143,7 @@
#endif
/* ! GCC_UNUSED >= 40300 */
#endif
/* ! GCC_UNUSED >= 40300 */
#if GCC_CHECK_VERSION(4,6)
&& !defined(__clang__)
#if GCC_CHECK_VERSION(4,6)
#define gcc_flatten __attribute__((flatten))
#define gcc_flatten __attribute__((flatten))
#else
#else
#define gcc_flatten
#define gcc_flatten
...
...
src/fs/AllocatedPath.cxx
View file @
cd6c5cfd
...
@@ -111,7 +111,7 @@ AllocatedPath::ChopSeparators()
...
@@ -111,7 +111,7 @@ AllocatedPath::ChopSeparators()
while
(
l
>=
2
&&
PathTraitsFS
::
IsSeparator
(
p
[
l
-
1
]))
{
while
(
l
>=
2
&&
PathTraitsFS
::
IsSeparator
(
p
[
l
-
1
]))
{
--
l
;
--
l
;
#if GCC_CHECK_VERSION(4,7)
&& !defined(__clang__)
#if GCC_CHECK_VERSION(4,7)
value
.
pop_back
();
value
.
pop_back
();
#else
#else
value
.
erase
(
value
.
end
()
-
1
,
value
.
end
());
value
.
erase
(
value
.
end
()
-
1
,
value
.
end
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment