www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/01/16:24:42

From: Per Kofod <per AT ollie DOT dnk DOT hp DOT com>
Subject: Re: -funsigned-char -Wall and C++ compilation
To: pervenas AT athena DOT compulink DOT forthnet DOT gr
Date: Wed, 1 Jun 94 22:13:36 METDST
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP Mailing list)
Mailer: Elm [revision: 70.85]

> Is there anyone that could explain to me, why the following piece of code
> when compiled as C++ (options: -x c++ -Wall -funsigned-char)
> generates the warning 'comparison between promoted unsigned and signed'
> but when compiled as plain C (options: -Wall -f unsigned char) does not ?
> 
> If the declaration of x is changed to 'unsigned char x' in C++, why
> there is no warning? What is the difference ?

The option "-funsigned-char" is a C only option, this option does not work
for C++

--
**********************************************************************
********    / /    ******** HEWLETT PACKARD DANISH RESPONSE CENTER   *
*****      / /        ***** Per Kofod                                *
****      / /          **** Hewlett-Packard A/S                      *
***      / /___ ______  *** Kongevejen 25                            *
***     / __  // __  /  *** DK3460 Birkeroed  / DENMARK              *
***    / / / // /_/ /   ***                                          *
***   /_/ /_// ____/    *** mail> per AT ollie DOT dnk DOT hp DOT com       	     *
****        / /        **** HPDESK> Per KOFOD / HPITCB/93            *
*****      / /        ***** Phone> +45 45991111                      *
********  / /      ******** Fax>   +45 45821363                      *
**********************************************************************


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019