Browse Source

Add the ability to display the detected compiler

inmarket 3 years ago
parent
commit
4b61ae71fe
2 changed files with 216 additions and 0 deletions
  1. 1 0
      gfxconf.example.h
  2. 215 0
      src/gfx_compilers.h

+ 1 - 0
gfxconf.example.h

@@ -46,6 +46,7 @@
46 46
 // Options that (should where relevant) apply to all operating systems
47 47
 //    #define GFX_NO_INLINE                            FALSE
48 48
 //    #define GFX_COMPILER                             GFX_COMPILER_UNKNOWN
49
+//    #define GFX_SHOW_COMPILER                        FALSE
49 50
 //    #define GFX_CPU                                  GFX_CPU_UNKNOWN
50 51
 //    #define GFX_CPU_NO_ALIGNMENT_FAULTS              FALSE
51 52
 //    #define GFX_CPU_ENDIAN                           GFX_CPU_ENDIAN_UNKNOWN

+ 215 - 0
src/gfx_compilers.h

@@ -38,6 +38,13 @@
38 38
 		#define GFXINLINE
39 39
 	#endif
40 40
 
41
+	/**
42
+	 * @brief	Show which compiler we detected as a compiler warning message
43
+	 */
44
+	#ifndef GFX_SHOW_COMPILER
45
+		#define GFX_SHOW_COMPILER		FALSE
46
+	#endif
47
+	
41 48
 	/**
42 49
 	 * @brief	Enable compiler specific code
43 50
 	 * @details	Auto detected by default but it can be overridden in gfxconf.h
@@ -285,8 +292,14 @@
285 292
 	#undef GFX_COMPILER_VERSION_PATCH
286 293
 	#undef GFX_COMPILER_VERSION_BUILD
287 294
 	#if GFX_COMPILER ==  GFX_COMPILER_ACC
295
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
296
+			#warning "Compiler: ACC"
297
+		#endif
288 298
 		#define GFX_COMPILER_NAME					"ACC"
289 299
 	#elif GFX_COMPILER ==  GFX_COMPILER_ALTIUM
300
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
301
+			#warning "Compiler: ALTIUM"
302
+		#endif
290 303
 		#define GFX_COMPILER_NAME					"Altium MicroBlaze C"
291 304
 		#ifdef __BUILD__
292 305
 			#define GFX_COMPILER_VERSION_MAJOR		((__BUILD__)/1000000)
@@ -298,6 +311,9 @@
298 311
 			#define GFX_COMPILER_VERSION_PATCH		(__REVISION__)
299 312
 		#endif
300 313
 	#elif GFX_COMPILER ==  GFX_COMPILER_ALTIUMHW
314
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
315
+			#warning "Compiler: ALTIUMHW"
316
+		#endif
301 317
 		#define GFX_COMPILER_NAME					"Altium C-to-Hardware"
302 318
 		#ifdef __BUILD__
303 319
 			#define GFX_COMPILER_VERSION_MAJOR		((__BUILD__)/1000000)
@@ -309,8 +325,14 @@
309 325
 			#define GFX_COMPILER_VERSION_PATCH		(__REVISION__)
310 326
 		#endif
311 327
 	#elif GFX_COMPILER ==  GFX_COMPILER_AMSTERDAM
328
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
329
+			#warning "Compiler: AMSTERDAM"
330
+		#endif
312 331
 		#define GFX_COMPILER_NAME					"Amsterdam Compiler Kit"
313 332
 	#elif GFX_COMPILER == GFX_COMPILER_ARMCC
333
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
334
+			#warning "Compiler: ARMCC"
335
+		#endif
314 336
 		#define GFX_COMPILER_NAME					"ARMCC"
315 337
 		#define GFX_COMPILER_VERSION_MAJOR			((__ARMCC_VERSION)/100000)
316 338
 		#define GFX_COMPILER_VERSION_MINOR			(((__ARMCC_VERSION)/10000)%10)
@@ -318,19 +340,31 @@
318 340
 		#define GFX_COMPILER_VERSION_BUILD			((__ARMCC_VERSION)%1000)
319 341
 		#define __LITTLE_IF_NOT_BIG__				// Oops - Defines __BIG_ENDIAN but not __LITTLE_ENDIAN
320 342
 	#elif GFX_COMPILER == GFX_COMPILER_AZTEC
343
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
344
+			#warning "Compiler: AZTEC"
345
+		#endif
321 346
 		#define GFX_COMPILER_NAME					"Aztec"
322 347
 		#define GFX_COMPILER_VERSION_MAJOR			((__VERSION)/100)
323 348
 		#define GFX_COMPILER_VERSION_MINOR			((__VERSION)%100)
324 349
 	#elif GFX_COMPILER == GFX_COMPILER_BORLAND
350
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
351
+			#warning "Compiler: BORLAND"
352
+		#endif
325 353
 		#define GFX_COMPILER_NAME					"Borland C++"
326 354
 		#define GFX_COMPILER_VERSION_MAJOR			((__BORLANDC__)/0x100)
327 355
 		#define GFX_COMPILER_VERSION_MINOR			(((((__BORLANDC__)%0x100)/0x10)*10) + ((__BORLANDC__)%0x10))
328 356
 	#elif GFX_COMPILER == GFX_COMPILER_CC65
357
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
358
+			#warning "Compiler: CC65"
359
+		#endif
329 360
 		#define GFX_COMPILER_NAME					"CC65"
330 361
 		#define GFX_COMPILER_VERSION_MAJOR			((__CC65__)/0x100)
331 362
 		#define GFX_COMPILER_VERSION_MINOR			(((__CC65__)/0x10)%0x10)
332 363
 		#define GFX_COMPILER_VERSION_PATCH			((__CC65__)%0x10)
333 364
 	#elif GFX_COMPILER == GFX_COMPILER_CLANG
365
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
366
+			#warning "Compiler: CLANG"
367
+		#endif
334 368
 		#define GFX_COMPILER_NAME					"CLang (LLVM)"
335 369
 		#define GFX_COMPILER_TESTED					TRUE
336 370
 		#define GFX_COMPILER_VERSION_MAJOR			(__clang_major__)
@@ -338,23 +372,41 @@
338 372
 		#define GFX_COMPILER_VERSION_PATCH			(__clang_patchlevel__)
339 373
 		#define DEPRECATED(msg)						__attribute__((deprecated(msg)))
340 374
 	#elif GFX_COMPILER == GFX_COMPILER_COMEAU
375
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
376
+			#warning "Compiler: COMEAU"
377
+		#endif
341 378
 		#define GFX_COMPILER_NAME					"Comeau C++"
342 379
 		#define GFX_COMPILER_VERSION_MAJOR			((__COMO_VERSION__)/100)
343 380
 		#define GFX_COMPILER_VERSION_MINOR			((__COMO_VERSION__)%100)
344 381
 	#elif GFX_COMPILER == GFX_COMPILER_COMPAQ
382
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
383
+			#warning "Compiler: COMPAQ"
384
+		#endif
345 385
 		#define GFX_COMPILER_NAME					"Compaq C"
346 386
 		#define GFX_COMPILER_VERSION_MAJOR			((__DECC_VER)/10000000)
347 387
 		#define GFX_COMPILER_VERSION_MINOR			(((__DECC_VER)/100000)%100)
348 388
 		#define GFX_COMPILER_VERSION_PATCH			((__DECC_VER)%10000)
349 389
 	#elif GFX_COMPILER == GFX_COMPILER_COMPCERT
390
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
391
+			#warning "Compiler: COMPCERT"
392
+		#endif
350 393
 		#define GFX_COMPILER_NAME					"Compcert"
351 394
 	#elif GFX_COMPILER == GFX_COMPILER_CONVEX
395
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
396
+			#warning "Compiler: CONVEX"
397
+		#endif
352 398
 		#define GFX_COMPILER_NAME					"Convex C"
353 399
 	#elif GFX_COMPILER == GFX_COMPILER_CRAY
400
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
401
+			#warning "Compiler: CRAY"
402
+		#endif
354 403
 		#define GFX_COMPILER_NAME					"Cray C/C++"
355 404
 		#define GFX_COMPILER_VERSION_MAJOR			(_RELEASE)
356 405
 		#define GFX_COMPILER_VERSION_MINOR			(_RELEASE_MINOR)
357 406
 	#elif GFX_COMPILER == GFX_COMPILER_CYGWIN
407
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
408
+			#warning "Compiler: CYGWIN"
409
+		#endif
358 410
 		#define GFX_COMPILER_NAME					"Cygwin"
359 411
 		#define GFX_COMPILER_TESTED					TRUE
360 412
 		#define GFX_COMPILER_VERSION_MAJOR			(__GNUC__)
@@ -364,20 +416,35 @@
364 416
 		#endif
365 417
 		#define DEPRECATED(msg)						__attribute__((deprecated(msg)))
366 418
 	#elif GFX_COMPILER == GFX_COMPILER_DAIB
419
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
420
+			#warning "Compiler: DAIB"
421
+		#endif
367 422
 		#define GFX_COMPILER_NAME					"Diab C/C++"
368 423
 		#define GFX_COMPILER_VERSION_MAJOR			((__VERSION_NUMBER__)/1000)
369 424
 		#define GFX_COMPILER_VERSION_MINOR			(((__VERSION_NUMBER__)/100)%10)
370 425
 		#define GFX_COMPILER_VERSION_PATCH			((__VERSION_NUMBER__)%100)
371 426
 	#elif GFX_COMPILER == GFX_COMPILER_DEC
427
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
428
+			#warning "Compiler: DEC"
429
+		#endif
372 430
 		#define GFX_COMPILER_NAME					"DEC"
373 431
 	#elif GFX_COMPILER == GFX_COMPILER_DICE
432
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
433
+			#warning "Compiler: DICE"
434
+		#endif
374 435
 		#define GFX_COMPILER_NAME					"DICE C"
375 436
 	#elif GFX_COMPILER == GFX_COMPILER_DIGNUS
437
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
438
+			#warning "Compiler: DIGNUS"
439
+		#endif
376 440
 		#define GFX_COMPILER_NAME					"Dignus Systems C++"
377 441
 		#define GFX_COMPILER_VERSION_MAJOR			((__SYSC_VER__)/10000)
378 442
 		#define GFX_COMPILER_VERSION_MINOR			(((__SYSC_VER__)/100)%100)
379 443
 		#define GFX_COMPILER_VERSION_PATCH			((__SYSC_VER__)%100)
380 444
 	#elif GFX_COMPILER == GFX_COMPILER_DJGPP
445
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
446
+			#warning "Compiler: DJGPP"
447
+		#endif
381 448
 		#define GFX_COMPILER_NAME					"DJGPP"
382 449
 		#ifdef __DJGPP__
383 450
 			#define GFX_COMPILER_VERSION_MAJOR		(__DJGPP__)
@@ -386,11 +453,17 @@
386 453
 			#define GFX_COMPILER_VERSION_MAJOR		(1)
387 454
 		#endif
388 455
 	#elif GFX_COMPILER == GFX_COMPILER_DMARS
456
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
457
+			#warning "Compiler: DMARS"
458
+		#endif
389 459
 		#define GFX_COMPILER_NAME					"Digital Mars"
390 460
 		#define GFX_COMPILER_VERSION_MAJOR			((__DMC__)/0x100)
391 461
 		#define GFX_COMPILER_VERSION_MINOR			(((__DMC__)/0x10)%0x10)
392 462
 		#define GFX_COMPILER_VERSION_PATCH			((__DMC__)%0x10)
393 463
 	#elif GFX_COMPILER == GFX_COMPILER_EDG
464
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
465
+			#warning "Compiler: EDG"
466
+		#endif
394 467
 		#define GFX_COMPILER_NAME					"EDG C++"
395 468
 		#define GFX_COMPILER_TESTED					TRUE
396 469
 		#define GFX_COMPILER_VERSION_MAJOR			((__EDG_VERSION__)/100)
@@ -403,13 +476,22 @@
403 476
 		#pragma diag_remark = Pe068
404 477
 		#pragma diag_remark = Pa050
405 478
 	#elif GFX_COMPILER == GFX_COMPILER_EKOPATH
479
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
480
+			#warning "Compiler: EKOPATH"
481
+		#endif
406 482
 		#define GFX_COMPILER_NAME					"EKOPath"
407 483
 		#define GFX_COMPILER_VERSION_MAJOR			(__PATHCC__)
408 484
 		#define GFX_COMPILER_VERSION_MINOR			(__PATHCC_MINOR__)
409 485
 		#define GFX_COMPILER_VERSION_PATCH			(__PATHCC_PATCHLEVEL__)
410 486
 	#elif GFX_COMPILER == GFX_COMPILER_FUJITSU
487
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
488
+			#warning "Compiler: FUJITSU"
489
+		#endif
411 490
 		#define GFX_COMPILER_NAME					"Fujitsu C++"
412 491
 	#elif GFX_COMPILER == GFX_COMPILER_GCC
492
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
493
+			#warning "Compiler: GCC"
494
+		#endif
413 495
 		#define GFX_COMPILER_NAME					"GCC"
414 496
 		#define GFX_COMPILER_TESTED					TRUE
415 497
 		#define GFX_COMPILER_VERSION_MAJOR			(__GNUC__)
@@ -419,13 +501,22 @@
419 501
 		#endif
420 502
 		#define DEPRECATED(msg)						__attribute__((deprecated(msg)))
421 503
 	#elif GFX_COMPILER == GFX_COMPILER_GREENHILL
504
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
505
+			#warning "Compiler: GREENHILL"
506
+		#endif
422 507
 		#define GFX_COMPILER_NAME					"Green Hill C/C++"
423 508
 		#define GFX_COMPILER_VERSION_MAJOR			((__GHS_VERSION_NUMBER__)/100)
424 509
 		#define GFX_COMPILER_VERSION_MINOR			(((__GHS_VERSION_NUMBER__)/10)%10)
425 510
 		#define GFX_COMPILER_VERSION_PATCH			((__GHS_VERSION_NUMBER__)%10)
426 511
 	#elif GFX_COMPILER == GFX_COMPILER_HIGHC
512
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
513
+			#warning "Compiler: HIGHC"
514
+		#endif
427 515
 		#define GFX_COMPILER_NAME					"Metaware High C/C++"
428 516
 	#elif GFX_COMPILER == GFX_COMPILER_HP
517
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
518
+			#warning "Compiler: HP"
519
+		#endif
429 520
 		#define GFX_COMPILER_NAME					"HP C/aC++"
430 521
 		#ifdef __HP_aCC
431 522
 			#if __HP_aCC == 1
@@ -438,6 +529,9 @@
438 529
 			#endif
439 530
 		#endif
440 531
 	#elif GFX_COMPILER == GFX_COMPILER_IAR
532
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
533
+			#warning "Compiler: IAR"
534
+		#endif
441 535
 		#define GFX_COMPILER_NAME					"IAR C++"
442 536
 		#define GFX_COMPILER_TESTED					TRUE
443 537
 		#define GFX_COMPILER_VERSION_MAJOR			((__VER__)/100)
@@ -450,6 +544,9 @@
450 544
 		#pragma diag_remark = Pe068
451 545
 		#pragma diag_remark = Pa050
452 546
 	#elif GFX_COMPILER == GFX_COMPILER_IBMXL
547
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
548
+			#warning "Compiler: IBMXL"
549
+		#endif
453 550
 		#define GFX_COMPILER_NAME					"IBM XL C/C++"
454 551
 		#ifdef __xlC__
455 552
 			#define GFX_COMPILER_VERSION_MAJOR		((__xlC__)/0x100)
@@ -470,8 +567,14 @@
470 567
 			#define GFX_COMPILER_VERSION_PATCH		((__IBMCPP__)%10)
471 568
 		#endif
472 569
 	#elif GFX_COMPILER == GFX_COMPILER_IMAGECRAFT
570
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
571
+			#warning "Compiler: IMAGECRAFT"
572
+		#endif
473 573
 		#define GFX_COMPILER_NAME					"Imagecraft C"
474 574
 	#elif GFX_COMPILER == GFX_COMPILER_INTEL
575
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
576
+			#warning "Compiler: INTEL"
577
+		#endif
475 578
 		#define GFX_COMPILER_NAME					"Intel ICC/ICPC"
476 579
 		#ifdef __INTEL_COMPILER
477 580
 			#define GFX_COMPILER_VERSION_MAJOR		((__INTEL_COMPILER)/100)
@@ -482,11 +585,17 @@
482 585
 			#endif
483 586
 		#endif
484 587
 	#elif GFX_COMPILER == GFX_COMPILER_KAI
588
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
589
+			#warning "Compiler: KAI"
590
+		#endif
485 591
 		#define GFX_COMPILER_NAME					"Kai C++"
486 592
 		#define GFX_COMPILER_VERSION_MAJOR			((__KCC_VERSION)/0x1000)
487 593
 		#define GFX_COMPILER_VERSION_MINOR			(((__KCC_VERSION)/0x100)%0x10)
488 594
 		#define GFX_COMPILER_VERSION_PATCH			((__KCC_VERSION)%0x100)
489 595
 	#elif GFX_COMPILER == GFX_COMPILER_KEIL
596
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
597
+			#warning "Compiler: KEIL"
598
+		#endif
490 599
 		#define GFX_COMPILER_NAME					"Keil"
491 600
 		#define GFX_COMPILER_TESTED					TRUE
492 601
 		#if defined(__ARMCC_VERSION)
@@ -515,22 +624,38 @@
515 624
 		#pragma diag_remark 83						// Turn off warning: type qualifier specified more than once
516 625
 		#pragma diag_remark 767						// Turn off warning: conversion from pointer to smaller integer
517 626
 		#pragma diag_remark 188						// Turn off warning: enumerated type mixed with another type
627
+		#pragma diag_remark 68						// Turn off warning: integer conversion resulted in a change of sign
518 628
 		#ifndef GFXINLINE							// Get the Keil definition for inline
519 629
 			#define GFXINLINE	__inline
520 630
 		#endif
521 631
 		#define __LITTLE_IF_NOT_BIG__				// Oops - Defines __BIG_ENDIAN but not __LITTLE_ENDIAN
522 632
 	#elif GFX_COMPILER == GFX_COMPILER_LCC
633
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
634
+			#warning "Compiler: LCC"
635
+		#endif
523 636
 		#define GFX_COMPILER_NAME					"LCC"
524 637
 	#elif GFX_COMPILER == GFX_COMPILER_METROWORKS
638
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
639
+			#warning "Compiler: METROWORKS"
640
+		#endif
525 641
 		#define GFX_COMPILER_NAME					"Metroworks CodeWarrior"
526 642
 		#define GFX_COMPILER_VERSION_MAJOR			((__MWERKS__)/0x1000)
527 643
 		#define GFX_COMPILER_VERSION_MINOR			(((__MWERKS__)/0x100)%0x10)
528 644
 		#define GFX_COMPILER_VERSION_PATCH			((__MWERKS__)%100)
529 645
 	#elif GFX_COMPILER == GFX_COMPILER_MICROTEC
646
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
647
+			#warning "Compiler: MICROTEC"
648
+		#endif
530 649
 		#define GFX_COMPILER_NAME					"Microtec C/C++"
531 650
 	#elif GFX_COMPILER == GFX_COMPILER_MICROWAY
651
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
652
+			#warning "Compiler: MICROWAY"
653
+		#endif
532 654
 		#define GFX_COMPILER_NAME					"Microway NDP C"
533 655
 	#elif GFX_COMPILER == GFX_COMPILER_MINGW32
656
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
657
+			#warning "Compiler: MINGW32"
658
+		#endif
534 659
 		#define GFX_COMPILER_NAME					"MingW32"
535 660
 		#define GFX_COMPILER_TESTED					TRUE
536 661
 		#define GFX_COMPILER_VERSION_MAJOR			(__GNUC__)
@@ -540,6 +665,9 @@
540 665
 		#endif
541 666
 		#define DEPRECATED(msg)						__attribute__((deprecated(msg)))
542 667
 	#elif GFX_COMPILER == GFX_COMPILER_MINGW64
668
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
669
+			#warning "Compiler: MINGW64"
670
+		#endif
543 671
 		#define GFX_COMPILER_NAME					"MingW64"
544 672
 		#define GFX_COMPILER_VERSION_MAJOR			(__GNUC__)
545 673
 		#define GFX_COMPILER_VERSION_MINOR			(__GNUC_MINOR__)
@@ -548,6 +676,9 @@
548 676
 		#endif
549 677
 		#define DEPRECATED(msg)						__attribute__((deprecated(msg)))
550 678
 	#elif GFX_COMPILER == GFX_COMPILER_MIPSPRO
679
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
680
+			#warning "Compiler: MIPSPRO"
681
+		#endif
551 682
 		#define GFX_COMPILER_NAME					"MIPS Pro"
552 683
 		#ifdef _SGI_COMPILER_VERSION
553 684
 			#define GFX_COMPILER_VERSION_MAJOR		((_SGI_COMPILER_VERSION)/100)
@@ -559,20 +690,38 @@
559 690
 			#define GFX_COMPILER_VERSION_PATCH		((_COMPILER_VERSION)%10)
560 691
 		#endif
561 692
 	#elif GFX_COMPILER == GFX_COMPILER_MIRACLE
693
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
694
+			#warning "Compiler: MIRACLE"
695
+		#endif
562 696
 		#define GFX_COMPILER_NAME					"Miracle C"
563 697
 	#elif GFX_COMPILER == GFX_COMPILER_MPW
698
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
699
+			#warning "Compiler: MPW"
700
+		#endif
564 701
 		#define GFX_COMPILER_NAME					"MPW C++"
565 702
 		#define GFX_COMPILER_VERSION_MAJOR			((__MRC__)/0x100)
566 703
 		#define GFX_COMPILER_VERSION_MINOR			((__MRC__)%0x100)
567 704
 	#elif GFX_COMPILER == GFX_COMPILER_NORCROFT
705
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
706
+			#warning "Compiler: NORCROFT"
707
+		#endif
568 708
 		#define GFX_COMPILER_NAME					"Norcroft C"
569 709
 	#elif GFX_COMPILER == GFX_COMPILER_NWCC
710
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
711
+			#warning "Compiler: NWCC"
712
+		#endif
570 713
 		#define GFX_COMPILER_NAME					"NWCC"
571 714
 	#elif GFX_COMPILER == GFX_COMPILER_OPEN64
715
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
716
+			#warning "Compiler: OPEN64"
717
+		#endif
572 718
 		#define GFX_COMPILER_NAME					"Open64"
573 719
 		#define GFX_COMPILER_VERSION_MAJOR			(__OPENCC__)
574 720
 		#define GFX_COMPILER_VERSION_MINOR			(__OPENCC_MINOR__)
575 721
 	#elif GFX_COMPILER == GFX_COMPILER_OSS
722
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
723
+			#warning "Compiler: OSS"
724
+		#endif
576 725
 		#define GFX_COMPILER_NAME					"Oracle Solaris Studio"
577 726
 		#ifdef __SUNPRO_C >= 0x1000
578 727
 			#define GFX_COMPILER_VERSION_MAJOR		((__SUNPRO_C)/0x1000)
@@ -584,23 +733,38 @@
584 733
 			#define GFX_COMPILER_VERSION_PATCH		((__SUNPRO_C)%0x10)
585 734
 		#endif
586 735
 	#elif GFX_COMPILER == GFX_COMPILER_PACIFIC
736
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
737
+			#warning "Compiler: PACIFIC"
738
+		#endif
587 739
 		#define GFX_COMPILER_NAME					"Pacific C"
588 740
 	#elif GFX_COMPILER == GFX_COMPILER_PALM
741
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
742
+			#warning "Compiler: PALM"
743
+		#endif
589 744
 		#define GFX_COMPILER_NAME					"Palm C/C++"
590 745
 		#define GFX_COMPILER_VERSION_MAJOR			((_PACC_VER)/0x10000000)
591 746
 		#define GFX_COMPILER_VERSION_MINOR			(((_PACC_VER)/0x100000)%0x100)
592 747
 		#define GFX_COMPILER_VERSION_PATCH			(((_PACC_VER)/0x1000)%0x100)
593 748
 		#define GFX_COMPILER_VERSION_BUILD			((_PACC_VER)%0x1000)
594 749
 	#elif GFX_COMPILER == GFX_COMPILER_PELLES
750
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
751
+			#warning "Compiler: PELLES"
752
+		#endif
595 753
 		#define GFX_COMPILER_NAME					"Pelles C"
596 754
 		#define GFX_COMPILER_VERSION_MAJOR			((__POCC__)/100)
597 755
 		#define GFX_COMPILER_VERSION_MINOR			((__POCC__)%100)
598 756
 	#elif GFX_COMPILER == GFX_COMPILER_PGCC
757
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
758
+			#warning "Compiler: PGCC"
759
+		#endif
599 760
 		#define GFX_COMPILER_NAME					"Portland PGCC/PGCPP"
600 761
 		#define GFX_COMPILER_VERSION_MAJOR			(__PGIC__)
601 762
 		#define GFX_COMPILER_VERSION_MINOR			(__PGIC_MINOR__)
602 763
 		#define GFX_COMPILER_VERSION_PATCH			(__PGIC_PATCHLEVEL__)
603 764
 	#elif GFX_COMPILER == GFX_COMPILER_RENESAS
765
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
766
+			#warning "Compiler: RENESAS"
767
+		#endif
604 768
 		#define GFX_COMPILER_NAME					"Renesas C/C++"
605 769
 		#ifdef __HITACHI_VERSION__
606 770
 			#define GFX_COMPILER_VERSION_MAJOR		((__HITACHI_VERSION__)/0x100)
@@ -615,6 +779,9 @@
615 779
 			#define GFX_COMPILER_VERSION_BUILD		((__RENESAS_VERSION__)%0x100)
616 780
 		#endif
617 781
 	#elif GFX_COMPILER == GFX_COMPILER_SASC
782
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
783
+			#warning "Compiler: SASC"
784
+		#endif
618 785
 		#define GFX_COMPILER_NAME					"SAS/C"
619 786
 		#ifdef __SASC__
620 787
 			#define GFX_COMPILER_VERSION_MAJOR		((__SASC__)/100)
@@ -624,24 +791,45 @@
624 791
 			#define GFX_COMPILER_VERSION_MINOR		(__REVISION__)
625 792
 		#endif
626 793
 	#elif GFX_COMPILER == GFX_COMPILER_SCO
794
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
795
+			#warning "Compiler: SCO"
796
+		#endif
627 797
 		#define GFX_COMPILER_NAME					"SCO OpenServer"
628 798
 	#elif GFX_COMPILER == GFX_COMPILER_SDCC
799
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
800
+			#warning "Compiler: SDCC"
801
+		#endif
629 802
 		#define GFX_COMPILER_NAME					"Small Device C"
630 803
 		#define GFX_COMPILER_VERSION_MAJOR			((SDCC)/100)
631 804
 		#define GFX_COMPILER_VERSION_MINOR			(((SDCC)/10)%10)
632 805
 		#define GFX_COMPILER_VERSION_PATCH			((SDCC)%10)
633 806
 	#elif GFX_COMPILER == GFX_COMPILER_SN
807
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
808
+			#warning "Compiler: SN"
809
+		#endif
634 810
 		#define GFX_COMPILER_NAME					"SN"
635 811
 	#elif GFX_COMPILER == GFX_COMPILER_STRATUS
812
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
813
+			#warning "Compiler: STRATUS"
814
+		#endif
636 815
 		#define GFX_COMPILER_NAME					"Stratus VOS C"
637 816
 		#define GFX_COMPILER_VERSION_MAJOR			(__VOSC__)
638 817
 	#elif GFX_COMPILER == GFX_COMPILER_SYMANTEC
818
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
819
+			#warning "Compiler: SYMANTEC"
820
+		#endif
639 821
 		#define GFX_COMPILER_NAME					"Symantec C++"
640 822
 		#define GFX_COMPILER_VERSION_MAJOR			((__SC__)/0x100)
641 823
 		#define GFX_COMPILER_VERSION_MINOR			((__SC__)%0x100)
642 824
 	#elif GFX_COMPILER == GFX_COMPILER_TENDRA
825
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
826
+			#warning "Compiler: TENDRA"
827
+		#endif
643 828
 		#define GFX_COMPILER_NAME					"TenDRA C/C++"
644 829
 	#elif GFX_COMPILER == GFX_COMPILER_THINK
830
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
831
+			#warning "Compiler: THINK"
832
+		#endif
645 833
 		#define GFX_COMPILER_NAME					"Think C"
646 834
 		#ifdef THINKC4
647 835
 			#define GFX_COMPILER_VERSION_MAJOR		(4)
@@ -649,14 +837,23 @@
649 837
 			#define GFX_COMPILER_VERSION_MAJOR		(3)
650 838
 		#endif
651 839
 	#elif GFX_COMPILER == GFX_COMPILER_TI
840
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
841
+			#warning "Compiler: TI"
842
+		#endif
652 843
 		#define GFX_COMPILER_NAME					"Texas Instruments C/C++"
653 844
 		#define GFX_COMPILER_VERSION_MAJOR			((SDCC)/1000000)
654 845
 		#define GFX_COMPILER_VERSION_MINOR			(((SDCC)/1000)%1000)
655 846
 		#define GFX_COMPILER_VERSION_PATCH			((SDCC)%1000)
656 847
 	#elif GFX_COMPILER == GFX_COMPILER_TINYC
848
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
849
+			#warning "Compiler: TINYC"
850
+		#endif
657 851
 		#define GFX_COMPILER_NAME					"Tiny C"
658 852
 		#define GFX_COMPILER_TESTED					TRUE
659 853
 	#elif GFX_COMPILER == GFX_COMPILER_TURBOC
854
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
855
+			#warning "Compiler: TURBOC"
856
+		#endif
660 857
 		#define GFX_COMPILER_NAME					"Borland Turbo C/C++"
661 858
 		#if __TURBOC__ < 0x295 || __TURBOC__ >= 0x400
662 859
 			#define GFX_COMPILER_VERSION_MAJOR		((__TURBOC__)/0x100)
@@ -672,17 +869,29 @@
672 869
 			#define GFX_COMPILER_VERSION_MINOR		(0)
673 870
 		#endif
674 871
 	#elif GFX_COMPILER == GFX_COMPILER_ULTIMATE
872
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
873
+			#warning "Compiler: ULTIMATE"
874
+		#endif
675 875
 		#define GFX_COMPILER_NAME					"Ultimate C/C++"
676 876
 		#define GFX_COMPILER_VERSION_MAJOR			(_MAJOR_REV)
677 877
 		#define GFX_COMPILER_VERSION_MINOR			(_MINOR_REV)
678 878
 	#elif GFX_COMPILER == GFX_COMPILER_USL
879
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
880
+			#warning "Compiler: USL"
881
+		#endif
679 882
 		#define GFX_COMPILER_NAME					"USL C"
680 883
 		#define GFX_COMPILER_VERSION_MAJOR			((__SCO_VERSION__)/100000000)
681 884
 		#define GFX_COMPILER_VERSION_MINOR			(((__SCO_VERSION__)/1000000)%100)
682 885
 		#define GFX_COMPILER_VERSION_BUILD			((__SCO_VERSION__)%1000000)
683 886
 	#elif GFX_COMPILER == GFX_COMPILER_VBCC
887
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
888
+			#warning "Compiler: VBCC"
889
+		#endif
684 890
 		#define GFX_COMPILER_NAME					"VBCC"
685 891
 	#elif GFX_COMPILER == GFX_COMPILER_VS
892
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
893
+			#warning "Compiler: VS"
894
+		#endif
686 895
 		#define GFX_COMPILER_NAME					"Microsoft Visual Studio"
687 896
 		#ifdef _MSC_FULL_VER
688 897
 			#if _MSC_FULL_VER < 100000000
@@ -703,10 +912,16 @@
703 912
 		#endif
704 913
 		#define DEPRECATED(msg)						__declspec(deprecated(msg))
705 914
 	#elif GFX_COMPILER == GFX_COMPILER_WATCOM
915
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
916
+			#warning "Compiler: WATCOM"
917
+		#endif
706 918
 		#define GFX_COMPILER_NAME					"Watcom C"
707 919
 		#define GFX_COMPILER_VERSION_MAJOR			((__WATCOMC__)/100)
708 920
 		#define GFX_COMPILER_VERSION_MINOR			((__WATCOMC__)%100)
709 921
 	#elif GFX_COMPILER == GFX_COMPILER_ZTC
922
+		#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
923
+			#warning "Compiler: ZTC"
924
+		#endif
710 925
 		#define GFX_COMPILER_NAME					"Zortech C++"
711 926
 		#define GFX_COMPILER_VERSION_MAJOR			((__ZTC__)/0x100)
712 927
 		#define GFX_COMPILER_VERSION_MINOR			(((__ZTC__)/0x10)%0x10)