컴파일 때 trigraph 에 대한 경고문

오랜만에 멀티플랫폼 빌드에서 특이한 경고를 보았다.
 
sprintf(s, "%s:?-??(??)", mi.pattern.c_str());

위의 코드가 문제의 코드인데, 다음과 같은 경고가 나왔다.
 
warning: trigraph converted to '[' character [-Wtrigraphs]
sprintf(s, "%s:?-??(??)", mi.pattern.c_str());
                 ^
warning: trigraph converted to ']' character [-Wtrigraphs]
sprintf(s, "%s:?-??(??)", mi.pattern.c_str());
                    ^
 
최근에는 거의 생각치도 않던 spec인 trigraph가 여기에 적용된 것인데,
예상을 못했던 것은 따옴표 안의 문장에서도 trigraph가 적용된다는 것이었다.
 
??( 는 [ 로, ??) 는 ] 로 변환이 되니, 문제의 
"%s:?-??(??)"
"%s:?-[]" 가 된다.

Posted by 안영기

2019/05/14 23:24 2019/05/14 23:24
Response
0 Trackbacks , 0 Comments
RSS :
http://smgal.ismine.net/tc_191/blog1/rss/response/52

Trackback URL : 이 글에는 트랙백을 보낼 수 없습니다

« Previous : 1 : 2 : 3 : 4 : 5 : 6 : 7 : ... 50 : Next »

블로그 이미지

게임 개발을 기반으로 한, 잡다한 개발 기록 저장소

- 안영기

Notices

Archives

Authors

  1. 안영기

Recent Comments

Recent Trackbacks

Calendar

«   2024/04   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Site Stats

Total hits:
236700
Today:
55
Yesterday:
72