* [RESEND PATCH] btrfs-progs: Specify C standard to gnu90 explicitly
@ 2017-08-15 0:17 Qu Wenruo
2017-08-18 15:20 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2017-08-15 0:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba, Qu Wenruo
Different C compilers have different default language standard.
This sometimes causes problem on different system.
For distribution like CentOS/RHEL7, its gcc is still 4.8 and will report
error for c90 style declaration, while most developers are using newer
gcc which will just ignore it.
This makes us hard to detect such language standard problem.
This patch will specify standard to gnu90 explicitly to avoid such problem.
Gnu90 is a good mix of c90 while provide a lot of useful gnu extension,
and is supported by all modern gcc and clang.
Reported-by: Marco Lorenzo Crociani <marcoc@prismatelecomtesting.com>
Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 81598df1..cb1b3c5f 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,7 @@ TOPDIR := $(shell pwd)
# Common build flags
CFLAGS = $(SUBST_CFLAGS) \
+ -std=gnu90 \
-include config.h \
-DBTRFS_FLAT_INCLUDES \
-D_XOPEN_SOURCE=700 \
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] btrfs-progs: Specify C standard to gnu90 explicitly
2017-08-15 0:17 [RESEND PATCH] btrfs-progs: Specify C standard to gnu90 explicitly Qu Wenruo
@ 2017-08-18 15:20 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2017-08-18 15:20 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs, dsterba
On Tue, Aug 15, 2017 at 09:17:12AM +0900, Qu Wenruo wrote:
> Different C compilers have different default language standard.
> This sometimes causes problem on different system.
>
> For distribution like CentOS/RHEL7, its gcc is still 4.8 and will report
> error for c90 style declaration, while most developers are using newer
> gcc which will just ignore it.
> This makes us hard to detect such language standard problem.
>
> This patch will specify standard to gnu90 explicitly to avoid such problem.
> Gnu90 is a good mix of c90 while provide a lot of useful gnu extension,
> and is supported by all modern gcc and clang.
>
> Reported-by: Marco Lorenzo Crociani <marcoc@prismatelecomtesting.com>
> Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-18 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 0:17 [RESEND PATCH] btrfs-progs: Specify C standard to gnu90 explicitly Qu Wenruo
2017-08-18 15:20 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).