aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-08-01 19:30:15 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2022-08-01 19:30:15 -0400
commite8bc6918b31e63fcaebe1e9dd64e0157d54f1b7a (patch)
tree8eff89565ceb891b5ece8594feae015e378d6722 /config
parentffd12be1394a49b734c51d2fee60584c66ff2f05 (diff)
c: improvements to address space diagnostics
This adds a clarifying "note" to address space mismatch diagnostics. For example, it improves the diagnostic for gcc.target/i386/addr-space-typeck-2.c from: addr-space-typeck-2.c: In function 'test_bad_call': addr-space-typeck-2.c:12:22: error: passing argument 2 of 'expects_seg_gs' from pointer to non-enclosed address space 12 | expects_seg_gs (0, ptr, 1); | ^~~ to: addr-space-typeck-2.c: In function 'test_bad_call': addr-space-typeck-2.c:12:22: error: passing argument 2 of 'expects_seg_gs' from pointer to non-enclosed address space 12 | expects_seg_gs (0, ptr, 1); | ^~~ addr-space-typeck-2.c:7:51: note: expected '__seg_gs void *' but argument is of type 'void *' 7 | extern void expects_seg_gs (int i, void __seg_gs *param, int j); | ~~~~~~~~~~~~~~~^~~~~ I took the liberty of adding the test coverage to i386 since we need a specific target to test this on. gcc/c/ChangeLog: * c-typeck.cc (build_c_cast): Quote names of address spaces in diagnostics. (convert_for_assignment): Add a note to address space mismatch diagnostics, specifying the expected and actual types. gcc/testsuite/ChangeLog: * gcc.target/i386/addr-space-typeck-1.c: New test. * gcc.target/i386/addr-space-typeck-2.c: New test. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions