amin__
amin__

Reputation: 1058

how can I work with digraphs and trigrpahs in bloodshed/DevC++ compiler

In compiler trigraphs and digraphs are not replacing by the corresponding single characters. Rather it's giving a warning something like this,

12:26 G:\BIN\cLang\macro2.cpp [Warning] trigraph ??= ignored, use -trigraphs to enable 

I want to know why this type of warning is giving and how can I solve this to use trigraphs and digraphs. In what purposes they were in the language???

NOTE - I want to see how digraphs & trigraphs work, so dont tell me to not to use them because they are obsolete... Thanks Advance

Upvotes: 0

Views: 367

Answers (2)

Lucas
Lucas

Reputation: 14129

Looks similar to the warning I get with gcc.

Compiled without any flags:

$ gcc trigraphs.c 
trigraphs.c:5:10: warning: trigraph ??= ignored, use -trigraphs to enable

So I add the flag suggested by the compiler:

$ gcc -trigraphs trigraphs.c 
$ ./a.out 
a test: #
$

This is my code that I stored in the file trigraphs.c:

#include <stdio.h>

int main(void){
        printf("a test: ??=\n");
        return 0;
}

Upvotes: 0

SpacedMonkey
SpacedMonkey

Reputation: 2773

The message tells you what to do, when you invoke the compiler add option -trigraphs

Upvotes: 1

Related Questions