This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
7 Replies Last post: Jun 24, 2009 6:36 AM by Michael_Wong  
Click to view Michael_Wong's profile   19 posts since
Sep 30, 2008

Jun 3, 2009 1:32 PM

Do you think trigraphs should be deprecated?

Hi all, I just posted a note about C++ Standard's Intention to deprecate trigraph in the C++ Standard blog.
http://www-949.ibm.com/software/rational/cafe/blogs/cpp-standard/2009/06/03/intention-to-deprecate-trigraphs-in-the-next-c-standard

Obviously, we think it is a bad idea.

I would be interested in any comments from groups in this board, either here or at the blog. Thanks.
Click to view DaveyC's profile   22 posts since
Jan 20, 2009
It's obviously a terrible idea because of EBCDIC. EBCDIC sucks, we all know that but it's still alive an kicking!
Click to view timhahn's profile   4 posts since
Nov 20, 2008

While trigraphs may seem like something that is of limited use, I see no reason to deprecate them. They have a useful purpose when dealing with source code that is stored in text files where the codepage of the source text is not amenable to the special characters (glyphs) which the C and C++ languages make use of (particularly brace and bracket glyphs).

My opinion is that trigraphs should not be deprecated.

Tim Hahn


Click to view DaveyC's profile   22 posts since
Jan 20, 2009
here's an interesting history lesson re EBCDIC http://www.trailing-edge.com/~bobbemer/P-BIT.HTM
Click to view DaveyC's profile   22 posts since
Jan 20, 2009
Thanks for the info...

We use the ubiquitous header...

??=ifdef __COMPILER_VER__
??=pragma filetag("IBM-1047")
??=endif

In all our header files. That includes libraries like boost. The bottom line is we choose IBM-1047 as the base codepage because it's the best match for ISO-8859-1 latin-1. I have opened problems with the likes of doxygen to fix missing trigraph support and had no problems. Same with Enterprise Architect etc. Pre-processing is easy, why drop something which will break something?


Bottom Banner