[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #18 from Georg-Johann Lay --- Author: gjl Date: Tue Jan 9 11:27:34 2018 New Revision: 256376 URL: https://gcc.gnu.org/viewcvs?rev=256376&root=gcc&view=rev Log: PR target/79883 * gcc.target/avr/torture/pr57631.c (dg-warning): Quote 'signal'. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/avr/torture/pr57631.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #7 from Georg-Johann Lay --- Author: gjl Date: Wed Jul 12 15:25:07 2017 New Revision: 250156 URL: https://gcc.gnu.org/viewcvs?rev=250156&root=gcc&view=rev Log: PR target/79883 * config/avr/avr.c (avr_set_current_function): In diagnostic messages: Quote keywords and (parts of) identifiers. [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or "INTERUPT". Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #8 from Georg-Johann Lay --- Author: gjl Date: Wed Jul 12 15:31:22 2017 New Revision: 250157 URL: https://gcc.gnu.org/viewcvs?rev=250157&root=gcc&view=rev Log: gcc/ Backport from 2017-07-12 trunk r250156. PR target/79883 * config/avr/avr.c (avr_set_current_function): In diagnostic messages: Quote keywords and (parts of) identifiers. [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or "INTERRUPT". Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/avr/avr.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Georg-Johann Lay changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |7.2 --- Comment #9 from Georg-Johann Lay --- Fixed in 7.2. The respective parts are quoted now. The function name is not repeated in the diagnostics as that name preceeds all the messages like in: foo.c: In function 'main': foo.c:3:5: error: ... ... Only the diagnostic complaining about a missing "__vector" prefix repeats the function name, but for the other diagnostics (like wrong prototype) the very name doesn't actually matter. Also enclosed in WITH_AVRLIBC now because this is naming convention of AVR-LibC.
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #10 from Georg-Johann Lay --- Author: gjl Date: Wed Jul 26 14:58:42 2017 New Revision: 250577 URL: https://gcc.gnu.org/viewcvs?rev=250577&root=gcc&view=rev Log: gcc/ Backport from 2016-06-15 trunk r237486. Backport from 2017-07-12 trunk r250156. PR target/79883 PR target/67353 * config/avr/avr.c (avr_set_current_function): Warn misspelled ISR only if -Wmisspelled-isr is on. In diagnostic messages: Quote keywords and (parts of) identifiers. [WITH_AVRLIBC]: Warn functions named "ISR", "SIGNAL" or "INTERUPT". * doc/invoke.texi (AVR Options) <-Wmisspelled-isr>: Decument. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/avr/avr.c branches/gcc-6-branch/gcc/config/avr/avr.opt branches/gcc-6-branch/gcc/doc/invoke.texi
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Roland Illig changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #11 from Roland Illig --- Commit r250156 introduced a typo in avr.c: "indentifier" should be "identifier".
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #12 from Georg-Johann Lay --- Author: gjl Date: Mon Aug 21 12:39:59 2017 New Revision: 251223 URL: https://gcc.gnu.org/viewcvs?rev=251223&root=gcc&view=rev Log: PR target/79883 * config/avr/avr.c (avr_set_current_function): Typo in diagnostic. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #13 from Georg-Johann Lay --- Author: gjl Date: Mon Aug 21 12:42:47 2017 New Revision: 251224 URL: https://gcc.gnu.org/viewcvs?rev=251224&root=gcc&view=rev Log: PR target/79883 * config/avr/avr.c (avr_set_current_function): Typo in diagnostic. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/avr/avr.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #14 from Georg-Johann Lay --- Author: gjl Date: Mon Aug 21 12:44:23 2017 New Revision: 251225 URL: https://gcc.gnu.org/viewcvs?rev=251225&root=gcc&view=rev Log: PR target/79883 * config/avr/avr.c (avr_set_current_function): Typo in diagnostic. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/avr/avr.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Georg-Johann Lay changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #15 from Georg-Johann Lay --- #
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #16 from Georg-Johann Lay --- Author: gjl Date: Tue Aug 22 09:48:48 2017 New Revision: 251269 URL: https://gcc.gnu.org/viewcvs?rev=251269&root=gcc&view=rev Log: gcc/ Backport from 2016-06-15 trunk r237486. Backport from 2017-07-12 trunk r250156. PR target/79883 PR target/67353 * config/avr/avr.c (avr_set_current_function): Warn misspelled ISR only if -Wmisspelled-isr is on. In diagnostic messages: Quote keywords and (parts of) identifiers. [WITH_AVRLIBC]: Warn functions named "ISR", "SIGNAL" or "INTERUPT". * doc/invoke.texi (AVR Options) <-Wmisspelled-isr>: Document. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/avr/avr.c branches/gcc-5-branch/gcc/config/avr/avr.opt branches/gcc-5-branch/gcc/doc/invoke.texi
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #17 from Aldy Hernandez --- Author: aldyh Date: Wed Sep 13 17:13:54 2017 New Revision: 252504 URL: https://gcc.gnu.org/viewcvs?rev=252504&root=gcc&view=rev Log: PR target/79883 * config/avr/avr.c (avr_set_current_function): Typo in diagnostic. Modified: branches/range-gen2/gcc/ChangeLog branches/range-gen2/gcc/config/avr/avr.c
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #1 from Andrew Pinski --- I think this is correctly untranslated as interrupt and signal here are keywords.
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #2 from Roland Illig --- Quoting myself from bug 79868: Although "interrupt" and "signal" are both keywords in the language, they are not used as such in this diagnostic. Rather, they form part of the normal sentence structure. For example in French, one might translate: le traiteur d'interrupt le traiteur du signal So depending on the inserted word, the outside sentence changes. Therefore these keywords cannot be inserted using placeholders but must be part of the whole sentence. (I don't know whether my French is completely correct, but I think that would be a reasonable translation.)
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Frederic Marchal changed: What|Removed |Added CC||fmarchal at perso dot be --- Comment #3 from Frederic Marchal --- I confirm this is a problem at two more places within the same avr_set_current_function() function: if (args && TREE_CODE (TREE_VALUE (args)) != VOID_TYPE) error_at (loc, "%qs function cannot have arguments", isr); if (TREE_CODE (ret) != VOID_TYPE) error_at (loc, "%qs function cannot return a value", isr); I had to degrade the French translation to accommodate the %qs. The correct translation for "interrupt function" should have been "la fonction d'interruption" but it is, instead, the ugly "la fonction avec l'attribut « interrupt »". Similarly, "signal function" should be "la fonction de traitement du signal" instead of the silly looking "la fonction avec l'attribut « signal »". The keyword idiom is correct in this instance though: error_at (loc, "function attributes %qs, %qs and %qs are mutually" " exclusive", "OS_task", "OS_main", isr); Therefore, I suggest to replace the above two messages with if (args && TREE_CODE (TREE_VALUE (args)) != VOID_TYPE) { if (cfun->machine->is_interrupt) error_at (loc, "% function cannot have arguments"); else error_at (loc, "% function cannot have arguments"); } if (TREE_CODE (ret) != VOID_TYPE) { if (cfun->machine->is_interrupt) error_at (loc, "% function cannot return a value"); else error_at (loc, "% function cannot return a value"); } And the one reported by Roland with if (!STR_PREFIX_P (name, "__vector")) { if (cfun->machine->is_interrupt) warning_at (loc, OPT_Wmisspelled_isr, "%qs appears to be a misspelled " "interrupt handler, missing __vector prefix", name); else warning_at (loc, OPT_Wmisspelled_isr, "%qs appears to be a misspelled " "signal handler, missing __vector prefix", name); }
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-03-16 CC||msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Martin Sebor --- Confirmed. I think the diagnostics in config/avr/avr.c are simply unfortunately worded. They are parameterized on the name of the attribute the functions they refer to are decorated with, but they use the name of the attribute as a plain English word, no doubt for brevity. There should be a way to reword them to avoid the problems pointed out here without making them overly verbose. For example, this warning: warning_at (loc, OPT_Wmisspelled_isr, "%qs appears to be a misspelled " "%s handler, missing __vector prefix", name, isr); could be worded like so: warning_at (loc, OPT_Wmisspelled_isr, "%qs with attribute %qs is " "missing the %<__vector%> prefix", name, isr); (with the __vector prefix quoted because it's part of the identifier). Similarly this error error_at (loc, "%qs function cannot have arguments", isr); could be worded like this: error_at (loc, "%qs with %qs attribute cannot have arguments", name, isr); (I.e., if the warning mentions the name of the function so should the error, for consistency.)
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 --- Comment #5 from Frederic Marchal --- I agree with your proposal to reword the messages. It is in line with what I did with the French translation to circumvent the problem of the attribute being used as a plain English word.
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Georg-Johann Lay changed: What|Removed |Added CC||gjl at gcc dot gnu.org --- Comment #6 from Georg-Johann Lay --- We could just turn signal into __signal__ and interrupt into __interrupt__ to be more clear.
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Georg-Johann Lay changed: What|Removed |Added Keywords||diagnostic Priority|P3 |P5
[Bug target/79883] avr i18n: untranslated "interrupt" or "signal"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883 Georg-Johann Lay changed: What|Removed |Added Severity|normal |minor