Skip to content
Snippets Groups Projects
  • Piotr Trojanek's avatar
    16c32050
    ada: Fix iteration over component items with pragmas · 16c32050
    Piotr Trojanek authored
    Component items in a record declaration might include pragmas, which
    must be ignored when detecting components with default expressions.
    
    More a code cleanup than a bugfix, as it only affects artificial corner
    cases. Found while fixing missing legality checks for variant component
    declarations.
    
    gcc/ada/
    
    	* sem_ch3.adb (Check_CPP_Type_Has_No_Defaults): Iterate with
    	First_Non_Pragma and Next_Non_Pragma.
    	* exp_dist.adb (Append_Record_Traversal): Likewise.
    16c32050
    History
    ada: Fix iteration over component items with pragmas
    Piotr Trojanek authored
    Component items in a record declaration might include pragmas, which
    must be ignored when detecting components with default expressions.
    
    More a code cleanup than a bugfix, as it only affects artificial corner
    cases. Found while fixing missing legality checks for variant component
    declarations.
    
    gcc/ada/
    
    	* sem_ch3.adb (Check_CPP_Type_Has_No_Defaults): Iterate with
    	First_Non_Pragma and Next_Non_Pragma.
    	* exp_dist.adb (Append_Record_Traversal): Likewise.