[Bug objc++/85335] New: Possible misuse of 'lang_GNU_OBJC' in 'default_floatn_builtin_p'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85335 Bug ID: 85335 Summary: Possible misuse of 'lang_GNU_OBJC' in 'default_floatn_builtin_p' Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: objc++ Assignee: unassigned at gcc dot gnu.org Reporter: avshash at hotmail dot com Target Milestone: --- In function 'default_floatn_builtin_p' at 'gcc/targhooks.c'. Using the lang_GNU_OBJC query that returns TRUE when the language is either Objective C, or Objective C++ (documentation in 'langhooks.c' implementation is wrong). According to documentation, the test is for Objective C only. Need to either clariffy the documentation, or replacte the function call with "(strcmp ("GNU Objective-C", lang_hooks.name) == 0)"
[Bug other/80909] New: auto-profile.c possible mismatching parentheses in MACRO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80909 Bug ID: 80909 Summary: auto-profile.c possible mismatching parentheses in MACRO Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: avshash at hotmail dot com Target Milestone: --- Line 358 in (gcc/)auto-profile.c: 'if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block) == UNKNOWN_LOCATION))' should probably be: ^^ 'if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block)) == UNKNOWN_LOCATION)'
[Bug c++/82650] New: -fdump-go-spec Segmentation fault on enums
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82650 Bug ID: 82650 Summary: -fdump-go-spec Segmentation fault on enums Product: gcc Version: 6.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: avshash at hotmail dot com Target Milestone: --- Using the '-fdump-go-spec' flag causes Segmentation fault when program has any enum definition on c++ files. Example: --- enum dummy_t { DUMMY_ENUM }; int main () { return 0 } command line - g++ main.cc -fdump-go-spec=dummy.go reason is the difference in enum tree between C and C++ Patch in 'godump.c', function 'go_output_typedef' (correct fix should be a proper function) - ADD: tree integer_cst = TREE_VALUE (element); if (TREE_CODE (integer_cst) == CONST_DECL) { integer_cst = DECL_INITIAL (integer_cst); } if (TREE_CODE (integer_cst) != INTEGER_CST) { internal_error ("..."); } CHANGE: if (tree_fits_shwi_p (integer_cst)) { // CHANGE ^^^ snprintf (buf, sizeof (buf), HOST_WIDE_INT_PRINT_DEC, tree_to_shwi (integer_cst)); // CHANGE ^^^ } else if (tree_fits_uhwi_p (integer_cst)) { // CHANGE ^^^ snprintf (buf, sizeof (buf), HOST_WIDE_INT_PRINT_UNSIGNED, tree_to_uhwi (integer_cst)); // CHANGE ^^^ } else { print_hex (wi::to_wide (integer_cst, buf)); // CHANGE ^^^ // the last one is also a bug in the C branch, // where there is a 'TREE_VALUE' missing // but unreachable code on my machine. }