public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* trigraphs ????
@ 2001-07-05  0:10 Aparna  Ranish
  2001-07-05  9:40 ` Michael Meissner
  0 siblings, 1 reply; 5+ messages in thread
From: Aparna  Ranish @ 2001-07-05  0:10 UTC (permalink / raw)
  To: gcc-help

Hi
         Can somebody tell me what is the usage of trigraphs ??? Is it supported by all the Compilers.
                                   
Thanx and regards
Aparna Ranish

____________________________________________________
Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm



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

* Re: trigraphs ????
  2001-07-05  0:10 trigraphs ???? Aparna  Ranish
@ 2001-07-05  9:40 ` Michael Meissner
  2001-07-05 10:45   ` Zack Weinberg
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Meissner @ 2001-07-05  9:40 UTC (permalink / raw)
  To: Aparna Ranish; +Cc: gcc-help, gcc

On Thu, Jul 05, 2001 at 07:15:53AM -0000, Aparna  Ranish wrote:
> Hi
> Can somebody tell me what is the usage of trigraphs ??? Is it supported by
> all the Compilers.

It is required to be supported by all ISO standard compilers.  The usage of
trigraphs is to work around problems where some characters in the C source
character set aren't available in the local character set (ie, some varients of
ISO 646 in other countries use the same byte value for curley braces and other
characters).

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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

* Re: trigraphs ????
  2001-07-05  9:40 ` Michael Meissner
@ 2001-07-05 10:45   ` Zack Weinberg
  0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2001-07-05 10:45 UTC (permalink / raw)
  To: Michael Meissner; +Cc: Aparna Ranish, gcc-help, gcc

On Thu, Jul 05, 2001 at 12:39:57PM -0400, Michael Meissner wrote:
> On Thu, Jul 05, 2001 at 07:15:53AM -0000, Aparna  Ranish wrote:
> > Hi
> > Can somebody tell me what is the usage of trigraphs ??? Is it supported by
> > all the Compilers.
> 
> It is required to be supported by all ISO standard compilers.  The
> usage of trigraphs is to work around problems where some characters
> in the C source character set aren't available in the local
> character set (ie, some varients of ISO 646 in other countries use
> the same byte value for curley braces and other characters).

However, note that trigraphs are disabled by default in GNU C/C++/ObjC.
To enable them, you must use a command line switch: any of -trigraphs,
-ansi, -std=c89, -std=c99, -std=c++98 will do the trick.  The latter
four have other effects as well.

-- 
zw   You have to care about the 'fair trial' part; you have to care about
     the 'due process of law' part, and you have to care about these things
     *more* than you care about putting child molestors away.
     	-- Graydon Saunders

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

* Re: trigraphs ????
  2001-07-05  7:59 Yann Collete
@ 2001-07-05  9:47 ` Ingo Krabbe
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Krabbe @ 2001-07-05  9:47 UTC (permalink / raw)
  To: Yann Collete; +Cc: gcc-help

>
> Is trigraphs used for something ????
>
I think they have been used for something but are not very usefull in our
days. Trigrpahs should achieve extending some charactersets which don't
have some characters. Anyway there has to be some reason why ISO once has
introduced these sequences.

Excerpt from gcc manual:
=================================== snip
       -trigraphs
           Process ISO standard trigraph sequences.  These are
           three-character sequences, all starting with ??, that
           are defined by ISO C to stand for single characters.
           For example, ??/ stands for \, so '??/n' is a charac-
           ter constant for a newline.  By default, GCC ignores
           trigraphs, but in standard-conforming modes it con-
           verts them.  See the -std and -ansi options.

           The nine trigraph sequences are

           ??( -> [

           ??) -> ]

           ??< -> {

           ??> -> }

           ??= -> #

           ??/ -> \

           ??' -> ^

           ??! -> |

           ??- -> ~

           Trigraph support is not popular, so many compilers do
           not implement it properly.  Portable code should not
           rely on trigraphs being either converted or ignored.

=================================== snip

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

* Re: trigraphs ????
@ 2001-07-05  7:59 Yann Collete
  2001-07-05  9:47 ` Ingo Krabbe
  0 siblings, 1 reply; 5+ messages in thread
From: Yann Collete @ 2001-07-05  7:59 UTC (permalink / raw)
  To: gcc-help

Hello,

trigraphs are symbols composed with three chars and beginning with the
two following chars ::. These symbols are converted into a char. For example

::) -> ]
::( -> [
etc..

(I'm not sure of the correspondance between trigraphs and chars).
Now, I've got a question:

Is trigraphs used for something ????

YC

> Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm
> List-Unsubscribe: 
< mailto:gcc-help-unsubscribe-collette=clt13bi.der.edf.fr@gcc.gnu.org >
> List-Archive: < http://gcc.gnu.org/ml/gcc-help/ >
> List-Post: < mailto:gcc-help@gcc.gnu.org >
> List-Help: < mailto:gcc-help-help@gcc.gnu.org >
> Delivered-To: mailing list gcc-help@gcc.gnu.org
> Date: 5 Jul 2001 07:15:53 -0000
> MIME-Version: 1.0
> To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>, "gcc@gcc.gnu.org" 
<gcc@gcc.gnu.org>
> Subject: trigraphs ????
> From: "Aparna  Ranish" <aparna_ranish@rediffmail.com>
> Content-ID: <Thu_Jul__5_12_45_53_IST_2001_0@mailweb29.rediffmail.com>
> Content-Description: Body
> Content-Transfer-Encoding: 7bit
> 
> Hi
>          Can somebody tell me what is the usage of trigraphs ??? Is it 
supported by all the Compilers.
>                                    
> Thanx and regards
> Aparna Ranish
> 
> ____________________________________________________
> Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm
> 
> 
> 

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

end of thread, other threads:[~2001-07-05 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-05  0:10 trigraphs ???? Aparna  Ranish
2001-07-05  9:40 ` Michael Meissner
2001-07-05 10:45   ` Zack Weinberg
2001-07-05  7:59 Yann Collete
2001-07-05  9:47 ` Ingo Krabbe

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).