[ccache] BUG: ccache + icecream + clang -Weverything results in false "warning: macro is not used [-Wunused-macros]"

2020-01-22 Thread Eric Chamberland via ccache

Hi,

We have a simple but annoying bug with ccache (3.7.1) + icecream + clang 
7.0.


This file:

=

#define UsedMacro double

double foo();

double foo() {
  UsedMacro var = 0;
  return var;
}

=

Compiles without warnings if compiled with bare clang 7.0 like this:

/usr/bin/clang -Weverything -c t.cc

It compiles also without warnings if I use cache:

ccache -C && /usr/lib64/ccache/clang -Weverything -c t.cc

But If I add export CCACHE_PREFIX=/opt/icecream-1.2/bin/icecc, resulting 
in this environnement:


CCACHE_PREFIX=/opt/icecream-1.2/bin/icecc
CCACHE_SLOPPINESS=include_file_mtime
CCACHE_HARDLINK=1
CCACHE_DIR=/d1/home/ericc/eric-ccache/

then I have a "false" warning:

ccache -C && /usr/lib64/ccache/clang -Weverything -c t.cc
Cleared cache
t.cc:1:9: warning: macro is not used [-Wunused-macros]
#define UsedMacro double
    ^
1 warning generated.


Is it a ccache bug or an icecream bug?

Thanks,

Eric


--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42


___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] BUG: ccache + icecream + clang -Weverything results in false "warning: macro is not used [-Wunused-macros]"

2020-01-22 Thread Éric Chamberland via ccache

It looks like it is a clang bug! See icecream answer here:

https://github.com/icecc/icecream/issues/514

Eric

Le 20-01-22 à 09:20, Eric Chamberland via ccache a écrit :

Hi,

We have a simple but annoying bug with ccache (3.7.1) + icecream + 
clang 7.0.


This file:

=

#define UsedMacro double

double foo();

double foo() {
  UsedMacro var = 0;
  return var;
}

=

Compiles without warnings if compiled with bare clang 7.0 like this:

/usr/bin/clang -Weverything -c t.cc

It compiles also without warnings if I use cache:

ccache -C && /usr/lib64/ccache/clang -Weverything -c t.cc

But If I add export CCACHE_PREFIX=/opt/icecream-1.2/bin/icecc, 
resulting in this environnement:


CCACHE_PREFIX=/opt/icecream-1.2/bin/icecc
CCACHE_SLOPPINESS=include_file_mtime
CCACHE_HARDLINK=1
CCACHE_DIR=/d1/home/ericc/eric-ccache/

then I have a "false" warning:

ccache -C && /usr/lib64/ccache/clang -Weverything -c t.cc
Cleared cache
t.cc:1:9: warning: macro is not used [-Wunused-macros]
#define UsedMacro double
    ^
1 warning generated.


Is it a ccache bug or an icecream bug?

Thanks,

Eric



--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42


___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache