public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* cc1: warning: unrecognized command line option "-Wno-narrowing"
@ 2011-11-06 15:04 Ralf Corsepius
  2011-11-08 20:23 ` Michael Meissner
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Corsepius @ 2011-11-06 15:04 UTC (permalink / raw)
  To: gcc; +Cc: Joel Sherrill, Jason Merrill, Paolo Carlini

Hi,

Since recently, I am facing several of the warnings above when building 
GCC-trunk cross for RTEMS targets.

So far, not much clues about what is going on, except that I see 
-Wno-narrowing were recently added to
gcc/configure.ac and libcpp/configure.ac.

Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-06 15:04 cc1: warning: unrecognized command line option "-Wno-narrowing" Ralf Corsepius
@ 2011-11-08 20:23 ` Michael Meissner
  2011-11-08 20:57   ` Jonathan Wakely
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Meissner @ 2011-11-08 20:23 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: gcc, Joel Sherrill, Jason Merrill, Paolo Carlini

On Sun, Nov 06, 2011 at 07:18:52AM +0100, Ralf Corsepius wrote:
> Hi,
> 
> Since recently, I am facing several of the warnings above when
> building GCC-trunk cross for RTEMS targets.
> 
> So far, not much clues about what is going on, except that I see
> -Wno-narrowing were recently added to
> gcc/configure.ac and libcpp/configure.ac.

FWIW, I'm seeing it also when I'm building on x86_64 RHEL 6.1 targeting
powerpc64-linux, so I suspect it is a cross compiler issue, but I haven't
checked it in detail.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com	fax +1 (978) 399-6899

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-08 20:23 ` Michael Meissner
@ 2011-11-08 20:57   ` Jonathan Wakely
  2011-11-08 22:01     ` Jason Merrill
  2011-11-08 22:13     ` Paolo Carlini
  0 siblings, 2 replies; 9+ messages in thread
From: Jonathan Wakely @ 2011-11-08 20:57 UTC (permalink / raw)
  To: Michael Meissner, Ralf Corsepius, gcc, Joel Sherrill,
	Jason Merrill, Paolo Carlini

On 8 November 2011 19:29, Michael Meissner wrote:
> On Sun, Nov 06, 2011 at 07:18:52AM +0100, Ralf Corsepius wrote:
>> Hi,
>>
>> Since recently, I am facing several of the warnings above when
>> building GCC-trunk cross for RTEMS targets.
>>
>> So far, not much clues about what is going on, except that I see
>> -Wno-narrowing were recently added to
>> gcc/configure.ac and libcpp/configure.ac.
>
> FWIW, I'm seeing it also when I'm building on x86_64 RHEL 6.1 targeting
> powerpc64-linux, so I suspect it is a cross compiler issue, but I haven't
> checked it in detail.

I saw it on a native build, possibly netbsd, but I ignored it as I was
in the middle of something.  Will keep an eye out for it again.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-08 20:57   ` Jonathan Wakely
@ 2011-11-08 22:01     ` Jason Merrill
  2011-11-08 22:13     ` Paolo Carlini
  1 sibling, 0 replies; 9+ messages in thread
From: Jason Merrill @ 2011-11-08 22:01 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Michael Meissner, Ralf Corsepius, gcc, Joel Sherrill, Paolo Carlini

On 11/08/2011 03:08 PM, Jonathan Wakely wrote:
> I saw it on a native build, possibly netbsd, but I ignored it as I was
> in the middle of something.  Will keep an eye out for it again.

I see it occasionally too, but haven't been able to reproduce it when 
calling the compiler directly.  Very odd.

Jason

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-08 20:57   ` Jonathan Wakely
  2011-11-08 22:01     ` Jason Merrill
@ 2011-11-08 22:13     ` Paolo Carlini
  2011-11-08 22:22       ` Jason Merrill
  1 sibling, 1 reply; 9+ messages in thread
From: Paolo Carlini @ 2011-11-08 22:13 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Michael Meissner, Ralf Corsepius, gcc, JoelSherrill, Jason Merrill

Hi,

> I saw it on a native build, possibly netbsd, but I ignored it as I was
> in the middle of something.  Will keep an eye out for it again.

I believe that the core issue is pretty clear: -Wno-narrowing disables a C++ only warning but somehow we are passing it also in a few C compiler invocations, thus the driver warns. We could suppress such warnings too ;) or special case those files?

Paolo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-08 22:13     ` Paolo Carlini
@ 2011-11-08 22:22       ` Jason Merrill
  2011-11-08 22:51         ` Paolo Carlini
  2011-11-09  0:27         ` Andreas Schwab
  0 siblings, 2 replies; 9+ messages in thread
From: Jason Merrill @ 2011-11-08 22:22 UTC (permalink / raw)
  To: Paolo Carlini
  Cc: Jonathan Wakely, Michael Meissner, Ralf Corsepius, gcc, JoelSherrill

On 11/08/2011 03:22 PM, Paolo Carlini wrote:
> I believe that the core issue is pretty clear: -Wno-narrowing disables a C++ only warning but somehow we are passing it also in a few C compiler invocations, thus the driver warns.

No, it's accepted by the C front end too, it just has no effect.  It's 
listed as a C option in c.opt.  But during builds cc1 warns about it 
sometimes and not others.  It's very odd.

Jason

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-08 22:22       ` Jason Merrill
@ 2011-11-08 22:51         ` Paolo Carlini
  2011-11-09  0:27         ` Andreas Schwab
  1 sibling, 0 replies; 9+ messages in thread
From: Paolo Carlini @ 2011-11-08 22:51 UTC (permalink / raw)
  To: Jason Merrill
  Cc: Jonathan Wakely, Michael Meissner, Ralf Corsepius, gcc, JoelSherrill

Hi,

> On 11/08/2011 03:22 PM, Paolo Carlini wrote:
>> I believe that the core issue is pretty clear: -Wno-narrowing disables a C++ only warning but somehow we are passing it also in a few C compiler invocations, thus the driver warns.
> 
> No, it's accepted by the C front end too, it just has no effect.

I see. Actually I'm clear about the no effect thing and also that the warning isn't really worrisome. But I thought that  the front end in general warns for such no effects warnings. I didn't really study the relevant code, to be honest.

Paolo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-08 22:22       ` Jason Merrill
  2011-11-08 22:51         ` Paolo Carlini
@ 2011-11-09  0:27         ` Andreas Schwab
  2011-11-09  8:04           ` Andreas Schwab
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2011-11-09  0:27 UTC (permalink / raw)
  To: Jason Merrill
  Cc: Paolo Carlini, Jonathan Wakely, Michael Meissner, Ralf Corsepius,
	gcc, JoelSherrill

Jason Merrill <jason@redhat.com> writes:

> No, it's accepted by the C front end too, it just has no effect.  It's
> listed as a C option in c.opt.  But during builds cc1 warns about it
> sometimes and not others.  It's very odd.

$ gcc -Wno-narrowing -c hello.c 
$ gcc -Wno-narrowing -c hello.c -Wall
hello.c:14:1: warning: return type defaults to ‘int’
cc1: warning: unrecognized command line option "-Wno-narrowing"

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: cc1: warning: unrecognized command line option "-Wno-narrowing"
  2011-11-09  0:27         ` Andreas Schwab
@ 2011-11-09  8:04           ` Andreas Schwab
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2011-11-09  8:04 UTC (permalink / raw)
  To: Jason Merrill
  Cc: Paolo Carlini, Jonathan Wakely, Michael Meissner, Ralf Corsepius,
	gcc, JoelSherrill

Andreas Schwab <schwab@linux-m68k.org> writes:

> Jason Merrill <jason@redhat.com> writes:
>
>> No, it's accepted by the C front end too, it just has no effect.  It's
>> listed as a C option in c.opt.  But during builds cc1 warns about it
>> sometimes and not others.  It's very odd.
>
> $ gcc -Wno-narrowing -c hello.c 
> $ gcc -Wno-narrowing -c hello.c -Wall
> hello.c:14:1: warning: return type defaults to ‘int’
> cc1: warning: unrecognized command line option "-Wno-narrowing"

/* Buffer the unknown option described by the string OPT.  Currently,
   we only complain about unknown -Wno-* options if they may have
   prevented a diagnostic. Otherwise, we just ignore them.  Note that
   if we do complain, it is only as a warning, not an error; passing
   the compiler an unrecognised -Wno-* option should never change
   whether the compilation succeeds or fails.  */

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-08 22:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-06 15:04 cc1: warning: unrecognized command line option "-Wno-narrowing" Ralf Corsepius
2011-11-08 20:23 ` Michael Meissner
2011-11-08 20:57   ` Jonathan Wakely
2011-11-08 22:01     ` Jason Merrill
2011-11-08 22:13     ` Paolo Carlini
2011-11-08 22:22       ` Jason Merrill
2011-11-08 22:51         ` Paolo Carlini
2011-11-09  0:27         ` Andreas Schwab
2011-11-09  8:04           ` Andreas Schwab

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 read-only IMAP folder(s) and NNTP newsgroup(s).