Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

trigraph ??/ ignored, use -trigraphs to enable

Tags:

c

gcc

My compiler (gcc) is giving me this warning. Please help me to understand what it means:

warning: trigraph ??/ ignored, use -trigraphs to enable

like image 749
Angus Avatar asked Dec 08 '11 17:12

Angus


2 Answers

You have "accidentally" written a trigraph somewhere in your source code (the compiler's warning would pinpoint the line). Since trigraphs were invented to solve a problem that doesn't come into play on modern systems, you don't actually want the trigraph ??/ to be replaced with the character \.

Therefore, this warning should probably be ignored (you can tell the compiler to shut up by adding -Wno-trigraphs after -Wall in your command line; see the docs). But it would be good to show your source code so we can be sure.

like image 50
Jon Avatar answered Sep 27 '22 18:09

Jon


Instead of adding a compiler flag, you could just escape each question mark with \, i.e. \?\?-. This helped in my case.

like image 31
Lukasz Czerwinski Avatar answered Sep 27 '22 16:09

Lukasz Czerwinski