This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why we can't have nice discarding const warnings


Zack Weinberg <zack@bitmover.com> writes:

|> After considerable staring, I've concluded there is no clean way to do
|> detailed warnings for assignments that discard qualifiers.
|> 
|> All of these warnings are in c-typeck.c and go through
|> warn_for_assignment.  warn_for_assignment is a helper function
|> which inserts "assignment" or "passing arg N of function BLEAH" into
|> a call to pedwarn.  It is _not_ printflike, you can only have one %s
|> in the pedwarn format string, and it gets used for
|> "assignment"/"passing...".

Not to forget that this is extremly i18n unfriendly.

Andreas.

-- 
Andreas Schwab                                  "And now for something
schwab@suse.de                                   completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]