#!/bin/sh # # flintEndian -- test for a group of endian-related errors, # including passing a pointer to the first two bytes of # a 4-byte int and expecting it to work on a SPARC. # # 66 Bad type -- A void type was employed where it is not # 67 Can't cast from Type to Type -- Attempt to cast a # 68 Can't cast from Type to Type -- Attempt to cast a # 69 Can't cast from Type to Type -- Bad conversion involving # 70 Can't cast from Type to Type -- Attempt to cast to a # 71 Can't cast from Type to Type -- Attempt to cast to a type # 110 Attempt to assign to void -- An attempt was made to # 124 Pointer to void not allowed -- A pointer to void was used # 413 Likely use of null pointer 'Symbol' in [left/right] # 418 Passing null pointer to function 'Symbol', Context # 433 Allocated area not large enough for pointer -- An # 501 Expected signed type -- The unary minus operator was # 502 Expected unsigned type -- Unary ~ being a bit operator # 503 Boolean argument to relational -- Normally a relational # 507 Size incompatibility -- A cast was made to an integral # 511 Size incompatibility -- A cast was made from an integral # 514 Unusual use of a Boolean -- An argument to an arithmetic # 515 Symbol 'Symbol' has arg. count conflict (Integer vs. # 516 Symbol 'Symbol' has arg. type conflict (no. Integer -- # 519 Size incompatibility -- An attempt was made to cast a # 520 Expected void type, assignment, increment or decrement. # 521 Expected void type, assignment, increment or decrement. # 522 Expected void type, assignment, increment or decrement. # 524 Loss of precision (Context) (Type to Type) -- There is a # 532 Return mode of function 'Symbol' inconsistent with # 545 Suspicious use of & -- An attempt was made to take the # 546 Suspicious use of & -- An attempt was made to take the # 549 Suspicious cast -- A cast was made from a pointer to some # 569 Loss of information (Context) (Integer bits to Integer # 570 Loss of sign (Context) (Type to Type) -- An assignment # 571 Suspicious Cast -- Usually this warning is issued for # 572 Excessive shift value (precision Integer shifted right by # 605 Increase in pointer capability (Context) -- This warning # 609 Suspicious pointer conversion -- An assignment is being # 610 Suspicious pointer combination -- Pointers of different # 611 Suspicious cast -- Either a pointer to a function is # 619 Loss of precision (Context) (Pointer to Pointer) -- A far # 632 Assignment to strong type 'Name' in context: Context -- # 633 Assignment from a strong type 'Name' in context: Context # 634 Strong type mismatch (type 'Symbol') in equality or # 635 resetting strong parent of type 'Symbol', old parent == # 636 ptr to strong type 'Name' versus another type -- Pointers # 637 Expected index type 'Symbol' for strong type 'Symbol' -- # 638 Strong type mismatch for type 'Name' in relational -- A # 639 Strong type mismatch for type 'Name' in binary operation # 640 Expected strong type 'Name' in Boolean context -- A # 641 Converting enum to int -- An enumeration type was used in # 643 Loss of precision in pointer cast -- A far pointer was # 647 Suspicious truncation -- This message is issued when it # 650 Constant out of range for operator String -- In a # 655 bit-wise operation uses (compatible) enum's -- A bit-wise # 656 Arithmetic operation uses (compatible) enum's -- An # 674 Returning address of auto through variable 'Symbol' -- # 679 Suspicious Truncation in arithmetic expression combining # 680 Suspicious Truncation in arithmetic expression converted # 684 Passing address of auto variable 'Symbol' into caller # 701 Shift left of signed quantity (int) -- Shifts are # 702 Shift right of signed quantity (int) -- Shifts are # 703 Shift left of signed quantity (long) -- Shifts are # 704 Shift right of signed quantity (long) -- Shifts are # 712 Loss of precision (Context) (Type to Type) -- An # 713 Loss of precision (Context) (Type to Type) -- An # 730 Boolean argument to function -- A Boolean was used as an # 731 Boolean argument to equal/not equal -- A Boolean was used # 732 Loss of sign (Context) (Type to Type) -- An assignment # 734 Loss of precision (Context) (Integer bits to Integer bits) # 735 Loss of precision (Context) (Integer bits to Integer bits) # 736 Loss of precision (Context) (Integer bits to Integer bits) # 737 Loss of sign in promotion from Type to Type -- An # 740 Unusual pointer cast (incompatible indirect types) -- A # 741 Unusual pointer cast (function qualification) -- A cast # 747 Significant prototype coercion (Context) Type to Type -- # 776 Possible truncation of addition -- An int expression # 790 Suspicious truncation, integral to float -- This message # 792 void cast of void expression -- A void expression has # 812 static variable 'Symbol' has size 'Integer' -- The amount # 815 Arithmetic modification of unsaved pointer -- An # 826 Suspicious pointer-to-pointer conversion (area too small) # 909 Implicit conversion from Type to bool -- A non-bool was # 911 Implicit expression promotion from Type to Type -- Notes # 912 Implicit binary conversion from Type to Type -- Notes # 913 Implicit adjustment of expected argument type from Type to # 914 Implicit adjustment of function return value from Type to # 915 Implicit conversion (Context) Type to Type -- Notes # 916 Implicit pointer assignment conversion (Context) -- Notes # 917 Prototype coercion (Context) Type to Type -- Notes # 918 Prototype coercion (Context) of pointers -- Notes # 919 Implicit conversion (Context) Type to Type -- A lower # 920 Cast from Type to void -- A cast is being made from the # 921 Cast from Type to Type -- A cast is being made from one # 922 Cast from Type to Type -- A cast is being made to or from # 923 Cast from Type to Type -- A cast is being made either # 924 Cast from Type to Type -- A cast is being made from a # 925 Cast from pointer to pointer -- A cast is being made to # 926 Cast from pointer to pointer -- A cast is being made to # 927 Cast from pointer to pointer -- A cast is being made to # 928 Cast from pointer to pointer -- A cast is being made from # 929 Cast from pointer to pointer -- A cast is being made to # 930 Cast from Type to Type -- A cast is being made to or from # 958 Padding of Integer byte(s) is required to align member on # 959 struct size (Integer bytes) is not an even multiple of the # 1056 assignment from void * is not allowed in C++ -- Whereas # 1059 Can't convert from Type to Type -- An attempt was made to # #set -x ProgName=`basename $0` ADD='+e66 +e67 +e68 +e69 +e70 +e71 +e110 +e124 +e413 +e418 +e433 +e501 +e502 \ +e503 +e507 +e511 +e514 +e515 +e516 +e519 +e520 +e521 +e522 +e524 +e532 \ +e545 +e546 +e549 +e569 +e570 +e571 +e572 +e605 +e609 +e610 +e611 +e619 \ +e632 +e633 +e634 +e635 +e636 +e637 +e638 +e639 +e640 +e641 +e643 +e647 \ +e650 +e655 +e656 +e674 +e679 +e680 +e684 +e701 +e702 +e703 +e704 +e712 \ +e713 +e730 +e731 +e732 +e734 +e735 +e736 +e737 +e740 +e741 +e747 +e776 \ +e790 +e792 +e812 +e815 +e826 +e909 +e911 +e912 +e913 +e914 +e915 +e916 \ +e917 +e918 +e919 +e920 +e921 +e922 +e923 +e924 +e925 +e926 +e927 +e928 \ +e929 +e930 +e958 +e959 +e1056 +e1059' main() { if [ $# -lt 1 ]; then say "$ProgName error: you must supply something to compile" say "Usage: $0 [cc-opts] file" exit 1 fi flint '-strong(AJX)' -w0 ${ADD} "$@" } say() { echo "$@" 1>&2 } main "$@"