Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#16 closed patch (fixed)

'and' is undefined keyword in C++

Reported by: mloskot Owned by: gsherman
Priority: critical: causes crash or data corruption Milestone:
Component: Projection Support Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: Windows
Platform Version: XP Professional Awaiting user input: no

Description

I noticed that in file qgis/src/widgets/projectionselector/qgsprojectionselector.cpp is used not real C++ keyword: and

In C++ it's reserved word but it's not supported - should not be used.


Here is what C++ Standard states in 2.11 Keywords chapter:

Furthermore, the alternative representations shown in Table 4 for certain operators and punctuators (2.5) are reserved and shall not be used otherwise:

Table 4: alternative representations and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq


VC++ does not support it. If GCC does, then please use -ansi switch (-pedantic is also recommended) to exclude such not portable extensions.

Attachments (1)

widgets-qgsprojectionselector.cpp-mloskot-20060314.patch (789 bytes ) - added by mloskot 18 years ago.
Patch that fixes bug in this Ticket

Download all attachments as: .zip

Change History (5)

by mloskot, 18 years ago

Patch that fixes bug in this Ticket

comment:1 by mloskot, 18 years ago

Type: bugpatch

I fixed this bug. Patch is attached.

comment:2 by gsherman, 18 years ago

Resolution: fixed
Status: newclosed

Already fixed in HEAD

comment:3 by anonymous, 17 years ago

Awaiting user input: unset
Must Fix for Release: No

comment:4 by (none), 15 years ago

Milestone: Version 0.8

Milestone Version 0.8 deleted

Note: See TracTickets for help on using tickets.