From: SourceForge.net <no...@so...> - 2008-05-01 19:08:59
|
Bugs item #1955609, was opened at 2008-05-01 14:08 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1955609&group_id=68108 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: AVR-LibC Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: mrainess (mrainess) Assigned to: Nobody/Anonymous (nobody) Summary: pgmspace.h PSTR Fails PC-Lint Initial Comment: In: C:\WinAVR-20080411\avr\include\avr\pgmspace.h # define PSTR(s) (__extension__({static char __c[] PROGMEM = s; &__c[0];})) Fails PC-Lint, because: static char __c[] PROGMEM = (s) has illegal syntax. It should be: static char __c[] PROGMEM = s; (s) is correct in a Define to guard against incorrect interpretation in the case where s is an expression. In this case s is a string. The change does not seem to bother GCC, and it makes Gimpel's PC-Lint happy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1955609&group_id=68108 |
From: SourceForge.net <no...@so...> - 2008-05-01 20:31:28
|
Bugs item #1955609, was opened at 2008-05-01 13:08 Message generated for change (Comment added) made by arcanum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1955609&group_id=68108 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: AVR-LibC Group: None >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: mrainess (mrainess) >Assigned to: Eric Weddington (arcanum) Summary: pgmspace.h PSTR Fails PC-Lint Initial Comment: In: C:\WinAVR-20080411\avr\include\avr\pgmspace.h # define PSTR(s) (__extension__({static char __c[] PROGMEM = s; &__c[0];})) Fails PC-Lint, because: static char __c[] PROGMEM = (s) has illegal syntax. It should be: static char __c[] PROGMEM = s; (s) is correct in a Define to guard against incorrect interpretation in the case where s is an expression. In this case s is a string. The change does not seem to bother GCC, and it makes Gimpel's PC-Lint happy. ---------------------------------------------------------------------- >Comment By: Eric Weddington (arcanum) Date: 2008-05-01 14:31 Message: Logged In: YES user_id=543419 Originator: NO Just because PC-Lint doesn't like something doesn't make it a real bug. In this case, the parentheses are totally harmless when the macro parameter is a string, and is a minor safeguard if someone accidentally uses an expression. This is not a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1955609&group_id=68108 |