]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
simplify-rtx: Simplify trunc of and of shiftrt
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
3a40d81d
NS
12015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2 Cesar Philippidis <cesar@codesourcery.com>
3 James Norris <jnorris@codesourcery.com>
4 Julian Brown <julian@codesourcery.com>
5 Nathan Sidwell <nathan@codesourcery.com>
6
7 c/
8 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
9 routine arg.
10 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
11 (c_parser_pragma): Parse 'acc routine'.
12 (OACC_ROUTINE_CLAUSE_MARK): Define.
13 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
14
fc402eec
AA
152015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
16
17 PR debug/67192
18 * c-typeck.c (c_finish_loop): For unconditional loops, set the
19 location of the backward-goto to the start of the loop body.
20
f6b0b3db
AA
212015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
22
23 PR debug/67192
24 * c-parser.c (c_parser_while_statement): Finish the loop before
25 parsing ahead for misleading indentation.
26 (c_parser_for_statement): Likewise.
27
ee45a32d
EB
282015-11-08 Eric Botcazou <ebotcazou@adacore.com>
29
30 * c-decl.c (finish_struct): If the structure has reverse storage
31 order, rewrite the type of array fields with scalar component. Call
32 maybe_apply_pragma_scalar_storage_order on entry.
33 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
34 errors on bit-fields and reverse SSO here and not...
35 (c_mark_addressable): ...here.
36 (output_init_element): Adjust call to initializer_constant_valid_p.
37 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
38
8a645150
DM
392015-11-06 David Malcolm <dmalcolm@redhat.com>
40
41 * c-decl.c (warn_defaults_to): Update for change in signature
42 of diagnostic_set_info.
43 * c-errors.c (pedwarn_c99): Likewise.
44 (pedwarn_c90): Likewise.
45 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
46 for textinfo::set_location.
47
7a5e4956
CP
482015-11-05 Cesar Philippidis <cesar@codesourcery.com>
49 Thomas Schwinge <thomas@codesourcery.com>
50 James Norris <jnorris@codesourcery.com>
51
52 * c-parser.c (c_parser_omp_clause_name): Add support for
53 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
54 (c_parser_omp_clause_default): Add is_oacc argument. Handle
55 default(none) in OpenACC.
56 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
57 arguments.
58 (c_parser_oacc_clause_tile): New function.
59 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
60 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
61 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
62 TILE}.
63 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
64 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
65 FIRSTPRIVATE}.
66 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
67 (c_parser_oacc_update): Update the error message for missing clauses.
68 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
69 and OMP_CLAUSE_INDEPENDENT.
70
bfcfbfa0
MP
712015-11-05 Marek Polacek <polacek@redhat.com>
72
73 PR c/68090
74 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
75 deal with pre-evaluation on invalid types.
76
e01d41e5
JJ
772015-11-05 Jakub Jelinek <jakub@redhat.com>
78 Ilya Verbin <ilya.verbin@intel.com>
79
80 * c-parser.c: Include context.h and gimple-expr.h.
81 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
82 monotonic together with nonmonotonic.
83 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
84 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
85 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
86 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
87 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
88 expressions on combined target teams before the target.
89 (c_parser_omp_declare_target): If decl has "omp declare target" or
90 "omp declare target link" attribute, and cgraph or varpool node already
91 exists, then set corresponding flags. Call c_finish_omp_clauses
92 in the parenthesized extended-list syntax case.
93 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
94 declare target.
95 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
96 on OMP_CLAUSE_REDUCTION array sections.
97 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
98 into the constant offset, or for variable low-bound using
99 POINTER_PLUS_EXPR. For structure element based array sections use
100 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
101 (c_finish_omp_clauses): Drop generic_field_head, structure
102 elements are now always mapped even as array section bases,
103 diagnose same var in data sharing and mapping clauses. Diagnose if
104 linear step on declare simd is neither a constant nor a uniform
105 parameter. Look through POINTER_PLUS_EXPR for array section
106 reductions. Diagnose the same var or function appearing multiple
107 times on the same directive. Fix up wording for the to clause if t
108 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
109 modifier on kinds other than dynamic or guided or nonmonotonic
110 modifier together with ordered clause.
111
4bf9e5a8
TS
1122015-11-03 Thomas Schwinge <thomas@codesourcery.com>
113 Chung-Lin Tang <cltang@codesourcery.com>
114
115 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
116
2adfab87
AM
1172015-10-29 Andrew MacLeod <amacleod@redhat.com>
118
119 * c-array-notation.c: Reorder #include's and remove duplicates.
120 * c-aux-info.c: Likewise.
121 * c-convert.c: Likewise.
122 * c-decl.c: Likewise.
123 * c-errors.c: Likewise.
124 * c-lang.c: Likewise.
125 * c-objc-common.c: Likewise.
126 * c-parser.c: Likewise.
127 * c-typeck.c: Likewise.
128
e922069e
JW
1292015-10-26 Jim Wilson <jim.wilson@linaro.org>
130
131 PR debug/66068
132 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
133 after calling build_qualified_type.
134
765dd391
CP
1352015-10-27 Cesar Philippidis <cesar@codesourcery.com>
136 Thomas Schwinge <thomas@codesourcery.com>
137 James Norris <jnorris@codesourcery.com>
138 Joseph Myers <joseph@codesourcery.com>
139 Julian Brown <julian@codesourcery.com>
140 Bernd Schmidt <bschmidt@redhat.com>
141
142 * c-parser.c (c_parser_oacc_shape_clause): New.
143 (c_parser_oacc_simple_clause): New.
144 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
145 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
146
88bae6f4
TS
1472015-10-27 Thomas Schwinge <thomas@codesourcery.com>
148 James Norris <jnorris@codesourcery.com>
149 Cesar Philippidis <cesar@codesourcery.com>
150
151 PR c/64765
152 PR c/64880
153 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
154 parameters, and handle these. Adjust all users.
155 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
156 into...
157 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
158 all users.
159 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
160 declare functions.
161 (c_finish_omp_construct): Declare function.
162 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
163 Merge functions into...
164 (c_finish_omp_construct): ... this new function.
165
a8fc2579
RB
1662015-10-22 Richard Biener <rguenther@suse.de>
167
168 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
169 before folding a MINUS_EXPR.
170
e9122ef6
MP
1712015-10-21 Marek Polacek <polacek@redhat.com>
172
173 PR c/68024
174 * c-decl.c (start_function): Warn about vararg functions without
175 a prototype.
176
9f47c7e5
IE
1772015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
178
179 * c-typeck.c (build_conditional_expr): Use boolean vector
180 type for vector comparison.
181 (build_vec_cmp): New.
182 (build_binary_op): Use build_vec_cmp for comparison.
183
fa60eeb9
MP
1842015-10-20 Marek Polacek <polacek@redhat.com>
185
186 * c-parser.c (is_cilkplus_vector_p): Don't define here.
187
2c7020eb
MP
1882015-10-20 Marek Polacek <polacek@redhat.com>
189
190 PR c/67964
191 * c-parser.c (c_parser_attributes): Break out of the loop if the
192 token after an attribute isn't a comma.
193
d9a6bd32
JJ
1942015-10-13 Jakub Jelinek <jakub@redhat.com>
195 Aldy Hernandez <aldyh@redhat.com>
196
197 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
198 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
199 (c_parser_omp_variable_list): Handle structure elements for
200 map, to and from clauses. Handle array sections in reduction
201 clause. Formatting fixes.
202 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
203 if clause modifiers.
204 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
205 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
206 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
207 c_parser_omp_clause_is_device_ptr): New functions.
208 (c_parser_omp_clause_ordered): Parse optional parameter.
209 (c_parser_omp_clause_reduction): Handle array reductions.
210 (c_parser_omp_clause_schedule): Parse optional simd modifier.
211 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
212 functions.
213 (c_parser_omp_clause_linear): Parse linear clause modifiers.
214 (c_parser_omp_clause_depend_sink): New function.
215 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
216 (c_parser_omp_clause_map): Parse release/delete map kinds and
217 optional always modifier.
218 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
219 and c_finish_omp_clauses callers.
220 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
221 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
222 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
223 (OMP_CRITICAL_CLAUSE_MASK): Define.
224 (c_parser_omp_critical): Parse critical clauses.
225 (c_parser_omp_for_loop): Handle doacross loops, adjust
226 c_finish_omp_for and c_finish_omp_clauses callers.
227 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
228 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
229 (OMP_FOR_CLAUSE_MASK): Add linear clause.
230 (c_parser_omp_for): Disallow ordered clause when combined with
231 distribute. Disallow linear clause when combined with distribute
232 and not combined with simd.
233 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
234 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
235 parse clauses and if depend clause is found, don't parse a body.
236 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
237 Allow target parallel without for after it.
238 (OMP_TASK_CLAUSE_MASK): Add priority clause.
239 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
240 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
241 invalid kinds.
242 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
243 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
244 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
245 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
246 functions.
247 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
248 defaultmap and is_device_ptr clauses.
249 (c_parser_omp_target): Parse target parallel and target simd. Set
250 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
251 and target exit data. Diagnose invalid map kinds.
252 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
253 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
254 construct.
255 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
256 &omp_priv.
257 (OMP_TASKLOOP_CLAUSE_MASK): Define.
258 (c_parser_omp_taskloop): New function.
259 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
260 handle PRAGMA_OMP_TASKLOOP.
261 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
262 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
263 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
264 Add IS_OMP argument, handle structure element bases, diagnose
265 bitfields, pass IS_OMP recursively, diagnose known zero length
266 array sections in depend clauses, handle array sections in reduction
267 clause, diagnose negative length even for pointers.
268 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
269 types, pass IS_OMP down to handle_omp_array_sections_1, handle
270 array sections in reduction clause, set
271 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
272 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
273 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
274 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
275
21ba0cea
MP
2762015-10-06 Marek Polacek <polacek@redhat.com>
277
278 * c-parser.c (c_parser_statement_after_labels): Use
279 protected_set_expr_location.
280 (c_parser_omp_clause_num_gangs): Likewise.
281 (c_parser_omp_clause_num_threads): Likewise.
282 (c_parser_omp_clause_num_workers): Likewise.
283 (c_parser_omp_clause_vector_length): Likewise.
284 (c_parser_omp_clause_num_teams): Likewise.
285 (c_parser_omp_clause_thread_limit): Likewise.
286 * c-typeck.c (build_c_cast): Likewise.
287 (c_cast_expr): Likewise.
288
624d31fe
RS
2892015-10-05 Richard Sandiford <richard.sandiford@arm.com>
290
291 * c-typeck.c (c_tree_equal): Use real_equal instead of
292 REAL_VALUES_EQUAL.
293
b8fd7909
JM
2942015-10-04 Jason Merrill <jason@redhat.com>
295
296 * c-parser.c (c_lex_one_token): Handle @synchronized.
297 * c-decl.c (match_builtin_function_types): A declaration of a built-in
298 can change whether the function is transaction_safe.
299
1c7485af
MP
3002015-10-02 Marek Polacek <polacek@redhat.com>
301
302 PR c/67730
303 * c-typeck.c (convert_for_assignment): Use the expansion point
304 location throughout.
305
3e3b8d63
MP
3062015-10-02 Marek Polacek <polacek@redhat.com>
307
308 PR c/64249
309 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
310 and pass it down to c_parser_if_statement.
311 (c_parser_else_body): Add CHAIN parameter and pass it down to
312 c_parser_statement_after_labels.
313 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
314 duplicated if-else-if conditions.
315
aabef2de
MP
3162015-10-01 Marek Polacek <polacek@redhat.com>
317
318 * c-typeck.c (convert_for_assignment): Improve commentary.
319
de8ddd5f
MP
3202015-09-30 Marek Polacek <polacek@redhat.com>
321
322 PR c/67730
323 * c-typeck.c (c_finish_return): Use the expansion point location for
324 certain "return with value" warnings.
325
c4914de6
MLI
3262015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
327
328 * c-parser.c (pragma_lex): Add loc argument.
329
0e36f5c7
MP
3302015-09-15 Marek Polacek <polacek@redhat.com>
331
332 PR c/67580
333 * c-decl.c (tag_exists_p): New function.
334 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
335 struct/union/enum keywords are missing.
336 * c-tree.h (tag_exists_p): Declare.
337
2f3bb934
MP
3382015-09-15 Marek Polacek <polacek@redhat.com>
339
340 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
341 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
342 Return NULL_TREE instead of 0.
343 (lookup_name): Return NULL_TREE instead of 0.
344 (lookup_name_in_scope): Likewise.
345 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
346 (parser_xref_tag): Use false instead of 0.
347 (start_struct): Use true instead of 1.
348 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
349
aa256c4a
MP
3502015-09-14 Marek Polacek <polacek@redhat.com>
351
352 * c-typeck.c (set_nonincremental_init_from_string): Use
353 HOST_WIDE_INT_M1U when shifting a negative value.
354
dbb68221
MW
3552015-09-09 Mark Wielaard <mjw@redhat.com>
356
357 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
358 parm against NULL.
359
a8a098ac
JJ
3602015-09-10 Jakub Jelinek <jakub@redhat.com>
361
362 PR c/67502
363 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
364 into OMP_FOR_PRE_BODY rather than before the loop.
365
f4b189d5
JJ
3662015-09-09 Jakub Jelinek <jakub@redhat.com>
367
0bb99c11
JJ
368 PR c/67501
369 * c-parser.c (c_parser_oacc_all_clauses,
370 c_parser_omp_all_clauses): Remove invalid clause from
371 list of clauses even if parser->error is set.
372
fce5e5e3
JJ
373 PR c/67500
374 * c-parser.c (c_parser_omp_clause_aligned,
375 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
376 test for errors.
377 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
378 error_mark_node.
379
f4b189d5
JJ
380 PR c/67495
381 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
382 instead of c_parser_unary_expression. If the result is !lvalue_p,
383 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
384
b2aaf235
MP
3852015-09-04 Marek Polacek <polacek@redhat.com>
386
387 PR sanitizer/67279
388 * c-typeck.c (build_binary_op): Don't instrument static initializers.
389
1807ffc1
MS
3902015-09-03 Martin Sebor <msebor@redhat.com>
391
392 PR c/66516
8b652e65
JJ
393 * c-typeck.c (convert_arguments, parser_build_unary_op,
394 build_conditional_expr, c_cast_expr, convert_for_assignment,
395 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
396 reject_gcc_builtin.
397 (c_decl_implicit): Define.
398
d04ff417
MP
3992015-09-02 Marek Polacek <polacek@redhat.com>
400
401 PR c/67432
402 * c-parser.c (c_parser_enum_specifier): Give a better error for
403 an empty enum.
404
a79683d5
TS
4052015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
406
407 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
408
191a6b94
MP
4092015-08-12 Marek Polacek <polacek@redhat.com>
410
411 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
412 LOC to it.
413
420a9d9b
MP
4142015-08-03 Marek Polacek <polacek@redhat.com>
415
416 PR c/67088
417 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
418 Use it.
419 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
420
992118a1
PP
4212015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
422
423 * c-parser.c (c_parser_if_body): Take token_indent_info
424 argument. Call warn_for_misleading_indentation even when the
425 body is a semicolon. Extract token_indent_infos corresponding
426 to the guard, body and next tokens. Adjust call to
427 warn_for_misleading_indentation accordingly.
428 (c_parser_else_body): Likewise.
429 (c_parser_if_statement): Likewise.
430 (c_parser_while_statement): Likewise.
431 (c_parser_for_statement): Likewise.
432
46308474
LFSM
4332015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
434 Manuel López-Ibáñez <manu@gcc.gnu.org>
435
436 * c-decl.c (get_parm_info): Remove static var. Update warning
437 message.
438
05b28fd6
MP
4392015-07-27 Marek Polacek <polacek@redhat.com>
440
441 PR c++/66555
442 PR c/54979
443 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
444
451b5e48
MP
4452015-07-20 Marek Polacek <polacek@redhat.com>
446
447 PR c++/55095
448 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
449 (build_binary_op): Warn about left shift overflows.
450
1916bcb5
AM
4512015-07-09 Andrew MacLeod <amacleod@redhat.com>
452
453 * c-array-notation.c: Adjust includes for flags.h changes.
454 * c-objc-common.c: Likewise.
455
c7131fb2
AM
4562015-07-07 Andrew MacLeod <amacleod@redhat.com>
457
458 * c-array-notation.c: Adjust includes.
459 * c-aux-info.c: Likewise.
460 * c-convert.c: Likewise.
461 * c-decl.c: Likewise.
462 * c-errors.c: Likewise.
463 * c-lang.c: Likewise.
464 * c-objc-common.c: Likewise.
465 * c-parser.c: Likewise.
466 * c-typeck.c: Likewise.
467
da2e71c9
MLI
4682015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
469
470 PR fortran/66605
471 * c-decl.c (finish_function): Call do_warn_unused_parameter.
472
b155cfd9
MP
4732015-06-29 Marek Polacek <polacek@redhat.com>
474
475 PR c/66322
476 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
477 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
478 about -Wswitch-bool here.
479 (do_case): Update c_add_case_label call.
480 (c_finish_case): Update c_do_switch_warnings call.
481
31521951
MP
4822015-06-27 Marek Polacek <polacek@redhat.com>
483
484 * c-typeck.c: Use VECTOR_TYPE_P throughout.
485
22d03525
MP
4862015-06-26 Marek Polacek <polacek@redhat.com>
487
488 * c-array-notation.c (fix_builtin_array_notation_fn): Use
489 INDIRECT_REF_P.
490 * c-typeck.c (array_to_pointer_conversion): Likewise.
491 (build_unary_op): Likewise.
492 (c_finish_return): Likewise.
493
f0889939
AM
4942015-06-25 Andrew MacLeod <amacleod@redhat.com>
495
496 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
497 * c-parser.c: Likewise.
498
8d67ee55
RS
4992015-06-25 Richard Sandiford <richard.sandiford@arm.com>
500
501 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
502 instead of pointer_hash.
503 (detect_field_duplicates): Likewise.
504
0ae9bd27
MP
5052015-06-25 Marek Polacek <polacek@redhat.com>
506
507 * c-array-notation.c: Use VAR_P throughout.
508 * c-decl.c: Likewise.
509 * c-objc-common.c: Likewise.
510 * c-parser.c: Likewise.
511 * c-typeck.c: Likewise.
512
62f9079a
MP
5132015-06-25 Marek Polacek <polacek@redhat.com>
514
515 * c-decl.c: Use is_global_var throughout.
516 * c-parser.c: Likewise.
517 * c-typeck.c: Likewise.
518
abb226c9
AM
5192015-06-17 Andrew MacLeod <amacleod@redhat.com>
520
521 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
522 * c-aux-info.c: Likewise.
523 * c-convert.c: Likewise.
524 * c-decl.c: Likewise.
525 * c-errors.c: Likewise.
526 * c-lang.c: Likewise.
527 * c-objc-common.c: Likewise.
528 * c-parser.c: Likewise.
529 * c-typeck.c: Likewise.
530
8cbababc
JH
5312015-06-11 Jan Hubicka <hubicka@ucw.cz>
532
533 PR middle-end/66325
534 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
535 variants.
536
a0349665
PMR
5372015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
538
539 * c-decl.c (pop_scope): Register the main translation unit
540 through the new debug hook.
541
13fdf2e2
AM
5422015-06-08 Andrew MacLeod <amacleod@redhat.com>
543
544 * c-array-notation.c : Adjust include files.
545 * c-aux-info.c : Likewise.
546 * c-convert.c : Likewise.
547 * c-decl.c : Likewise.
548 * c-errors.c : Likewise.
549 * c-lang.c : Likewise.
550 * c-lang.h : Likewise.
551 * c-objc-common.c : Likewise.
552 * c-parser.c : Likewise.
553 * c-typeck.c : Likewise.
554
d7438551
AH
5552015-06-05 Aldy Hernandez <aldyh@redhat.com>
556
557 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
558 immediately clobber it.
559 (c_write_global_declarations_1): Remove call to
560 check_global_declaration_1.
561 (c_write_global_declarations_2): Remove.
562 (c_write_final_cleanups): Rename from c_write_global_declarations.
563 Remove call to finalize_compilation_unit.
564 Remove calls to debugging hooks.
565 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
566 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
567 * c-tree.h: Remove c_write_global_declarations.
568
ecb9f223
AM
5692015-06-04 Andrew MacLeod <amacleod@redhat.com>
570
571 * c-array-notation.c: Adjust includes for restructured coretypes.h.
572 * c-aux-info.c: Likewise.
573 * c-convert.c: Likewise.
574 * c-decl.c: Likewise.
575 * c-errors.c: Likewise.
576 * c-lang.c: Likewise.
577 * c-objc-common.c: Likewise.
578 * c-parser.c: Likewise.
579 * c-typeck.c: Likewise.
580
9482b620
MP
5812015-06-04 Marek Polacek <polacek@redhat.com>
582
583 PR c/66341
584 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
585 it is a lvalue.
586
bc51ace3
PK
5872015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
588
589 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
590 Warn for empty struct.
591 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
592
ea5b45b6
AT
5932015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
594
595 * c-decl.c (start_function): Call plugin before parsing.
596 (finish_function): Call plugin after parsing.
597
c2d47482
PK
5982015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
599
600 PR c/49551
601 * c-decl.c (merge_decls): Merge DECL_COMMON.
602
a95492ab
JW
6032015-05-22 Jim Wilson <jim.wilson@linaro.org>
604
605 * Make-lang.in (check_gcc_pallelize): Define.
606
fd5c817a
MP
6072015-05-22 Marek Polacek <polacek@redhat.com>
608
609 PR c/47043
610 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
611 attributes.
612
c7b70a3c
MP
6132015-05-21 Marek Polacek <polacek@redhat.com>
614
615 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
616 DECL_BUILT_IN.
617
21b634ae
MP
6182015-05-20 Marek Polacek <polacek@redhat.com>
619
620 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
621 * c-typeck.c: Likewise.
622
296a8c2f
MP
6232015-05-19 Marek Polacek <polacek@redhat.com>
624
625 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
626
41b37d5e
JJ
6272015-05-19 Jakub Jelinek <jakub@redhat.com>
628
629 PR middle-end/66199
630 * c-parser.c (c_parser_omp_for_loop): Don't add
631 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
632 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
633 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
634 constructs.
635
fab27f52
MM
6362015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
637
638 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 639 swaps.
fab27f52 640
40de31cf
MLI
6412015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
642
643 PR fortran/44054
644 * c-objc-common.c (c_tree_printer): Replace locus pointer with
645 accessor function.
646
3aa3c9fc
MP
6472015-05-14 Marek Polacek <polacek@redhat.com>
648
649 PR c/66066
650 PR c/66127
651 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
652 rather than with 0.
653
c3388e62
DM
6542015-05-12 David Malcolm <dmalcolm@redhat.com>
655
656 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
657 to add a call to warn_for_misleading_indentation.
658 (c_parser_else_body): Likewise, adding param "else_loc".
659 (c_parser_if_statement): Check for misleading indentation.
660 (c_parser_while_statement): Likewise.
661 (c_parser_for_statement): Likewise.
662
755e528f
MP
6632015-05-08 Marek Polacek <polacek@redhat.com>
664
665 PR c/64918
666 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
667 (output_init_element): Likewise.
668
0173bd2a
MP
6692015-05-07 Marek Polacek <polacek@redhat.com>
670
671 PR c/65179
672 * c-typeck.c (build_binary_op): Warn when left shifting a negative
673 value.
674
9babc352
MP
6752015-04-30 Marek Polacek <polacek@redhat.com>
676
677 * c-typeck.c (set_init_label): Call error_at instead of error and
678 pass LOC to it.
679
ac9f18db
MP
680 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
681 the type of a decl.
682
ec3fba51
MP
683 * c-typeck.c (c_build_va_arg): Clarify the error message.
684
b811915d
TS
6852015-04-29 Thomas Schwinge <thomas@codesourcery.com>
686
687 * c-parser.c (c_parser_oacc_enter_exit_data): Use
688 OMP_STANDALONE_CLAUSES.
689
f3075008
MP
6902015-04-28 Marek Polacek <polacek@redhat.com>
691
692 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
693
4e81b788
MP
6942015-04-28 Marek Polacek <polacek@redhat.com>
695
696 PR c/65901
697 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
698
6c1db78e
MP
6992015-04-25 Marek Polacek <polacek@redhat.com>
700
701 PR c/52085
702 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
703 attribute.
704
5c4abbb8
MP
7052015-04-23 Marek Polacek <polacek@redhat.com>
706
707 PR c/65345
708 * c-decl.c (set_labels_context_r): New function.
709 (store_parm_decls): Call it via walk_tree_without_duplicates.
710 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
711 instead of create_tmp_var. Build TARGET_EXPR instead of
712 COMPOUND_EXPR.
713 (build_atomic_assign): Use create_tmp_var_raw instead of
714 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
715
06aca1d5
IV
7162015-04-20 Ilya Verbin <ilya.verbin@intel.com>
717
718 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
719 (c_parser_omp_target_update): Add missed %> to error_at ().
720
8fba1830
BRF
7212015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
722
723 PR target/55143
724 * c-decl.c (c_default_pointer_mode): Remove definition.
725 * c-tree.h (c_default_pointer_mode): Remove declaration.
726
62021f64
TB
7272015-03-27 Tobias Burnus <burnus@net-b.de>
728
729 PR c/65586
730 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
731 error out.
732 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
733 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
734 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
735
9b65e171
JJ
7362015-03-19 Jakub Jelinek <jakub@redhat.com>
737
738 * c-decl.c (c_decl_attributes): Also add "omp declare target"
739 attribute for DECL_EXTERNAL VAR_DECLs.
740
17958621
JJ
7412015-03-11 Jakub Jelinek <jakub@redhat.com>
742
743 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
744 argument.
745
7ccb1a11
JJ
7462015-03-10 Jakub Jelinek <jakub@redhat.com>
747
748 PR c/65120
749 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
750 before preparing arguments to warn_logical_not_parentheses.
751
01177669
JJ
7522015-03-09 Jakub Jelinek <jakub@redhat.com>
753
754 PR c/65120
755 * c-typeck.c (parser_build_binary_op): Don't warn for
756 !!x == y or !b == y where b is _Bool.
757
802ac282
MP
7582015-03-09 Marek Polacek <polacek@redhat.com>
759
760 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
761 * c-decl.c (grokdeclarator): Likewise.
762 * c-typeck.c (build_binary_op): Likewise.
763
e5165b60
MP
7642015-02-27 Marek Polacek <polacek@redhat.com>
765
766 PR c/65228
767 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
768
065d214c
MP
7692015-02-14 Marek Polacek <polacek@redhat.com>
770
771 PR c/64768
772 * c-decl.c (grokdeclarator): Set the range of a flexible array member
773 declared through a typedef name.
774
e5d9235b
MP
7752015-02-13 Marek Polacek <polacek@redhat.com>
776
777 PR c/65050
778 * c-decl.c (grokdeclarator): Print also the type when giving
779 the error message about array's incomplete element type.
780
fa01ffcc
JJ
7812015-02-11 Jakub Jelinek <jakub@redhat.com>
782
783 PR c/64824
784 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
785 check in the POP macro.
786
c3e38a03
MP
7872015-02-09 Marek Polacek <polacek@redhat.com>
788
789 PR c/64856
790 * c-typeck.c (process_init_element): Don't always wrap
791 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
792 initializing a range of elements.
793
4886ec8e
JJ
7942015-02-04 Jakub Jelinek <jakub@redhat.com>
795
796 PR c/64824
797 PR c/64868
798 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
799
c3e38a03 8002015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
801
802 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
803 processing enum declaration.
804
7b33f0c8
MP
8052015-01-29 Marek Polacek <polacek@redhat.com>
806
807 PR c/64709
808 * c-typeck.c (pop_init_level): If constructor_elements has
809 exactly one element with integer_zerop value, set constructor_zeroinit
810 to 1. Remove braces around warning_init call.
811
dea63e49
JJ
8122015-01-27 Jakub Jelinek <jakub@redhat.com>
813
814 PR c/64766
815 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
816 of FUNCTION_DECLs with error_mark_node.
817
d38f7dce
JJ
8182015-01-26 Jakub Jelinek <jakub@redhat.com>
819
820 PR c/64778
821 * c-typeck.c (convert_arguments): Return -1 if there are
822 error_args, even if we've diagnosed too many arguments.
823
cbf5d0e7
RB
8242015-01-21 Richard Biener <rguenther@suse.de>
825
826 PR middle-end/64313
827 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
828 for builtins the user declared correctly.
829
41dbbb37
TS
8302015-01-15 Thomas Schwinge <thomas@codesourcery.com>
831 Bernd Schmidt <bernds@codesourcery.com>
832 Cesar Philippidis <cesar@codesourcery.com>
833 James Norris <jnorris@codesourcery.com>
834 Jakub Jelinek <jakub@redhat.com>
835 Ilmir Usmanov <i.usmanov@samsung.com>
836
837 * c-parser.c: Include "gomp-constants.h".
838 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
839 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
840 Use OMP_CLAUSE_SET_MAP_KIND.
841 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
842 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
843 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
844 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
845 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
846 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
847 "copyout", "create", "delete", "deviceptr", "gang", "host",
848 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
849 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
850 "present_or_create", "pcreate", "seq", "self", "vector",
851 "vector_length", "wait", "worker".
852 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
853 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
854 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
855 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
856 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
857 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
858 (c_parser_oacc_data_clause_deviceptr)
859 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
860 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
861 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
862 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
863 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
864 (c_parser_oacc_parallel, c_parser_oacc_update)
865 (c_parser_oacc_wait): New functions.
866 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
867 (c_finish_oacc_data): New prototypes.
868 * c-typeck.c: Include "gomp-constants.h".
869 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
870 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
871 OMP_CLAUSE_SET_MAP_KIND.
872 (c_finish_oacc_parallel, c_finish_oacc_kernels)
873 (c_finish_oacc_data): New functions.
874 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
875 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
876 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
877 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
878 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
879 GOMP_MAP_FORCE_DEVICEPTR.
880
adfac8df
JJ
8812015-01-09 Michael Collison <michael.collison@linaro.org>
882
883 * c-array-notation.c: Include hash-set.h, machmode.h,
884 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
885 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
886 * c-aux-info.c: Ditto.
887 * c-convert.c: Ditto.
888 * c-decl.c: Ditto.
889 * c-errors.c: Ditto.
890 * c-lang.c: Dittoxs.
891 * c-objc-common.c: Ditto.
892 * c-parser.c: Ditto.
893 * c-typeck.c: Include hash-set.h, machmode.h,
894 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
895 fold-const.h, wide-int.h, inchash.h, real.h and
896 fixed-value.h due to flattening of tree.h.
897
2cc901dc
MP
8982015-01-07 Marek Polacek <polacek@redhat.com>
899
900 PR c/64417
901 * c-typeck.c (process_init_element): Disallow initialization of
902 a flexible array member with a string constant if the structure
903 is in an array.
904
5624e564
JJ
9052015-01-05 Jakub Jelinek <jakub@redhat.com>
906
e5341100
JJ
907 PR sanitizer/64344
908 * c-typeck.c (convert_for_assignment, c_finish_return): For
909 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
910 types also set in_late_binary_op around convert call.
911 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
912 to integral type casts, if not in_late_binary_op, pass c_fully_fold
913 result on expr as last argument to ubsan_instrument_float_cast,
914 if in_late_binary_op, don't use c_save_expr but save_expr.
915
5624e564
JJ
916 Update copyright years.
917
5bd012f8
MP
9182015-01-05 Marek Polacek <polacek@redhat.com>
919
920 PR c/64423
921 * c-typeck.c (build_array_ref): Pass loc down to
922 warn_array_subscript_with_type_char.
923
768952be
MU
9242014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
925
926 * c-typeck.c: New behavious for pointers to arrays with qualifiers
927 (common-pointer-type): For pointers to arrays take qualifiers from
928 element type.
929 (build_conditional_expr): Add warnings for lost qualifiers.
930 (comp-target-types): Allow pointers to arrays with different qualifiers.
931 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
932 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
933 to PEDWARN_FOR_QUALIFIERS.
934
8f94a8c4
JJ
9352014-12-17 Jakub Jelinek <jakub@redhat.com>
936
937 PR sanitizer/64289
938 * c-convert.c: Include ubsan.h.
939 (convert): For real -> integral casts and
940 -fsanitize=float-cast-overflow don't call convert_to_integer, but
941 instead instrument the float cast directly.
942
b731b390
JJ
9432014-11-29 Jakub Jelinek <jakub@redhat.com>
944
945 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
946 c_finish_stmt_expr): Remove NULL last argument from
947 create_tmp_var_raw and create_tmp_var calls.
948 * c-array-notation.c (fix_builtin_array_notation_fn,
949 build_array_notation_expr, fix_conditional_array_notations_1,
950 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
951
541e35a6
MP
9522014-11-28 Marek Polacek <polacek@redhat.com>
953
954 PR c/63862
955 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
956 convert the right operand to integer type.
957
b286be94
MP
9582014-11-25 Marek Polacek <polacek@redhat.com>
959
960 PR c/63877
961 * c-decl.c (start_function): Disable -Wmissing-declarations warning
962 for inline functions.
963
aa7da51a
JJ
9642014-11-21 Jakub Jelinek <jakub@redhat.com>
965
966 PR target/63764
967 * c-typeck.c (build_array_ref): Adjust
968 convert_vector_to_pointer_for_subscript caller. If it returns true,
969 call non_lvalue_loc on the result.
970
d876207f
RB
9712014-11-11 Richard Biener <rguenther@suse.de>
972
973 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
974 to true.
975
e5e44252
AK
9762014-11-10 Andi Kleen <ak@linux.intel.com>
977
978 PR c/60804
979 * c-parser.c (c_parser_statement_after_labels): Call
980 check_no_cilk.
981 (c_parser_if_statement): Dito.
982 (c_parser_switch_statement): Dito.
983 (c_parser_while_statement): Dito.
984 (c_parser_do_statement): Dito.
985 (c_parser_for_statement): Dito.
986 * c-typeck.c (c_finish_loop): Dito.
987
13c21655
PC
9882014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
989
990 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
991 OPT_Wshift_count_overflow in the warnings.
992
2d51fcef
MP
9932014-10-30 Marek Polacek <polacek@redhat.com>
994
995 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
996 print the stripped version as well, if they're not the same.
997
ef4bddc2
RS
9982014-10-29 Richard Sandiford <richard.sandiford@arm.com>
999
1000 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1001 machine_mode.
1002
c582198b
AM
10032014-10-28 Andrew MacLeod <amacleod@redhat.com>
1004
1005 * c-decl.c: Adjust include files.
1006 * c-parser.c: Ditto.
1007
ddc8de03
PM
10082014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1009 Tom Tromey <tromey@redhat.com>
1010
1011 * c-tree.h (enum c_oracle_request): New.
1012 (c_binding_oracle_function): New typedef.
1013 (c_binding_oracle, c_pushtag, c_bind): Declare.
1014 * c-decl.c (c_binding_oracle): New global.
1015 (I_SYMBOL_CHECKED): New macro.
1016 (i_symbol_binding): New function.
1017 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1018 (I_TAG_CHECKED): New macro.
1019 (i_tag_binding): New function.
1020 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1021 (I_LABEL_CHECKED): New macro.
1022 (i_label_binding): New function.
1023 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1024 (c_print_identifier): Save and restore c_binding_oracle.
1025 (c_pushtag, c_bind): New functions.
1026
60393bbc
AM
10272014-10-27 Andrew MacLeod <amacleod@redhat.com>
1028
1029 * c-typeck.c: Adjust include files.
1030
d723bb7c
MLI
10312014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1032
1033 PR c++/53061
1034 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1035 initialization here...
1036 (c_initialize_diagnostics): ... but here. Set defaults after
1037 building pretty-printer.
1038
1bc5a451
MP
10392014-10-23 Marek Polacek <polacek@redhat.com>
1040
1041 PR c/63626
1042 * c-decl.c (pop_scope): Don't print warning in external_scope.
1043
4435bb92
MP
10442014-10-19 Marek Polacek <polacek@redhat.com>
1045
1046 PR c/63567
1047 * c-typeck.c (output_init_element): Allow initializing objects with
1048 static storage duration with compound literals even in C99 and add
1049 pedwarn for it.
1050
7278465e
MP
10512014-10-17 Marek Polacek <polacek@redhat.com>
1052
1053 PR c/63567
1054 * c-typeck.c (digest_init): Allow initializing objects with static
1055 storage duration with compound literals even in C99 and add pedwarn
1056 for it.
1057
d9b7be2e
MP
10582014-10-17 Marek Polacek <polacek@redhat.com>
1059
1060 PR c/63543
1061 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1062 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1063 error multiple times. Print the type.
1064
f406ae1f
MP
10652014-10-17 Marek Polacek <polacek@redhat.com>
1066
1067 PR c/63549
1068 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1069 type.
1070
92574c7c
MP
10712014-10-17 Marek Polacek <polacek@redhat.com>
1072
1073 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1074 (start_function): Use OPT_Wimplicit_int instead of 0.
1075 (store_parm_decls_oldstyle): Likewise.
1076
1bc4a978
MT
10772014-10-17 Alan Modra <amodra@gmail.com>
1078
1079 PR middle-end/61848
1080 * c-decl.c (merge_decls): Don't merge section name or tls model
1081 to newdecl symtab node, instead merge to olddecl. Override
1082 existing olddecl section name. Set tls_model for all thread-local
1083 vars, not just OMP thread-private ones. Remove incorrect comment.
1084
83685514
AM
10852014-10-16 Andrew MacLeod <amacleod@redhat.com>
1086
1087 * c-decl.c: Adjust include files.
1088
78a7c317
DD
10892014-10-14 DJ Delorie <dj@redhat.com>
1090
1091 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1092 (c_token_starts_typename): Check all __intN, not just __int128.
1093 (c_token_starts_declspecs): Likewise.
1094 (c_parser_declspecs): Likewise.
1095 (c_parser_attribute_any_word): Likewise.
1096 (c_parser_objc_selector): Likewise.
1097 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1098 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1099 is specified.
1100 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1101 __int128.
1102 (finish_declspecs): Likewise.
1103
74d98c1e
AB
11042014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1105
1106 * c-parser.c (c_parser_all_labels): New function to replace
1107 the duplicate code.
1108 (c_parser_statement): Call the new function.
1109
84937de2
MP
11102014-10-09 Marek Polacek <polacek@redhat.com>
1111
1112 PR c/63480
1113 * c-typeck.c (pop_init_level): Don't warn about initializing
1114 with { }.
1115
0382aaa0
MP
11162014-10-07 Marek Polacek <polacek@redhat.com>
1117
1118 PR c/59717
1119 * c-decl.c (header_for_builtin_fn): New function.
1120 (implicitly_declare): Suggest which header to include.
1121
7a0ca710
MP
11222014-10-07 Marek Polacek <polacek@redhat.com>
1123
1124 * c-convert.c (convert): Use error_operand_p.
1125 * c-typeck.c (require_complete_type): Likewise.
1126 (really_atomic_lvalue): Likewise.
1127 (digest_init): Likewise.
1128 (handle_omp_array_sections_1): Likewise.
1129
6bc8a126
MP
11302014-10-03 Marek Polacek <polacek@redhat.com>
1131
1132 PR c/63453
1133 * c-decl.c (pop_scope): Don't warn about "inline function declared
1134 but never defined" for functions marked with gnu_inline attribute.
1135
d90c0a59
JJ
11362014-09-25 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR c++/63249
1139 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1140 on low_bound and length.
1141
083e891e
MP
11422014-09-24 Marek Polacek <polacek@redhat.com>
1143
1144 PR c/61405
1145 PR c/53874
1146 * c-parser.c: Don't define CPP_KEYWORD.
1147 (c_parser_switch_statement): Pass original type to c_finish_case.
1148 * c-tree.h (c_finish_case): Update declaration.
1149 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1150 conditionally to c_do_switch_warnings.
1151
8d95fe25
MP
11522014-09-03 Marek Polacek <polacek@redhat.com>
1153
1154 PR c/62024
1155 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1156 conversions.
1157
9a771876
JJ
11582014-09-02 Jakub Jelinek <jakub@redhat.com>
1159 Balaji V. Iyer <balaji.v.iyer@intel.com>
1160 Igor Zamyatin <igor.zamyatin@intel.com>
1161
1162 * c-parser.c (c_parser_cilk_for): New function.
1163 (c_parser_cilk_grainsize): Likewise.
1164 (c_get_temp_regvar): Likewise.
1165 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1166 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1167 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1168 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1169 case.
1170
b7679d96
CG
11712014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1172
1173 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1174 with using HOST_WIDE_INT without truncation to 'int'
1175
59ea0364
MP
11762014-08-22 Marek Polacek <polacek@redhat.com>
1177
1178 PR c++/62199
1179 * c-typeck.c (parser_build_binary_op): Adjust call to
1180 warn_logical_not_parentheses.
1181
671a475e
IZ
11822014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1183
1184 PR other/62008
1185 * c-parser.c (c_parser_array_notation): Check for correct
1186 type of an array added.
1187
04159acf
MP
11882014-08-19 Marek Polacek <polacek@redhat.com>
1189
1190 PR c++/62153
1191 * c-typeck.c (build_binary_op): If either operand of a comparison
1192 is a boolean expression, call maybe_warn_bool_compare.
1193
c77935ee
PP
11942014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1195
1196 PR c/45584
1197 * c-typeck.c (build_c_cast): Do a conversion even when the
1198 TYPE_MAIN_VARIANTs are the same.
1199
35aff4fb
MP
12002014-08-19 Marek Polacek <polacek@redhat.com>
1201
1202 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1203 pedwarn_c99 instead of pedwarn.
1204 (grokfield): Likewise.
1205 (warn_defaults_to): New function.
1206 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1207 Unconditionally call pedwarn_c99 instead of pedwarn.
1208 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1209 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1210 check flag_isoc11 before.
1211 * c-errors.c (pedwarn_c99): Change the return type to bool.
1212 Handle -Wc99-c11-compat.
1213 * c-parser.c (disable_extension_diagnostics): Handle
1214 warn_c99_c11_compat.
1215 (restore_extension_diagnostics): Likewise.
1216 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1217 instead of pedwarn, don't check flag_isoc11 before.
1218 (c_parser_declspecs): Likewise.
1219 (c_parser_alignas_specifier): Likewise.
1220 (c_parser_alignof_expression): Likewise.
1221 (c_parser_generic_selection): Likewise.
1222 * c-tree.h (pedwarn_c99): Update declaration.
1223 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1224 of pedwarn_c99.
1225
177cce46
MP
12262014-08-19 Marek Polacek <polacek@redhat.com>
1227
1228 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1229 to pedwarn_c90.
1230 * c-errors.c: Include "opts.h".
1231 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1232 * c-parser.c (disable_extension_diagnostics): Handle negative value
1233 of warn_c90_c99_compat, too.
1234 (restore_extension_diagnostics): Likewise.
1235 (c_parser_compound_statement_nostart): Pass
1236 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1237
6dc99c33
MP
12382014-08-12 Marek Polacek <polacek@redhat.com>
1239
1240 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1241 Add pedwarn.
1242 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1243 Likewise.
1244 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1245
f3bede71
MP
12462014-08-10 Marek Polacek <polacek@redhat.com>
1247
1248 PR c/51849
1249 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1250 Call pedwarn_c90 instead of pedwarn.
1251 (check_bitfield_type_and_width): Likewise.
1252 (declspecs_add_qual): Likewise.
1253 (declspecs_add_type): Likewise.
1254 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1255 Adjust to only call pedwarn_c90.
1256 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1257 pedwarn_c90 instead of pedwarn.
1258 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1259 * c-parser.c (disable_extension_diagnostics): Handle
1260 warn_c90_c99_compat.
1261 (restore_extension_diagnostics): Likewise.
1262 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1263 pedwarn_c90 instead of pedwarn.
1264 (c_parser_initelt): Likewise.
1265 (c_parser_postfix_expression): Likewise.
1266 (c_parser_postfix_expression_after_paren_type): Likewise.
1267 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1268 * c-tree.h: Fix formatting.
1269 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1270 pedwarn_c90 instead of pedwarn.
1271
9f25a338
TS
12722014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1273
1274 * c-typeck.c: Remove include of pointer-set.h.
1275
044331a8
MP
12762014-08-07 Marek Polacek <polacek@redhat.com>
1277
1278 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1279
b787e7a2
TS
12802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1281
1282 * c-typeck.c: Use hash_map instead of pointer_map.
1283
6e2830c3
TS
12842014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1285
1286 * c-decl.c: Use hash_set instead of pointer_set.
1287
a7ee52fb
IZ
12882014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1289
1290 PR middle-end/61455
1291 * c-array-notation.c (expand_array_notations): Handling
1292 of DECL_EXPR added.
1293
b4dfdc11
MG
12942014-07-31 Marc Glisse <marc.glisse@inria.fr>
1295
1296 PR c++/60517
1297 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1298 a local variable.
1299
976d5a22
TT
13002014-07-30 Tom Tromey <tromey@redhat.com>
1301
1302 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1303 field.
1304 (really_start_incremental_init, push_init_level): Initialize
1305 designator_depth.
1306 (pop_init_level): Set global designator_depth.
1307 (process_init_element): Check for designated_init attribute.
1308
30281de2
MP
13092014-07-20 Marek Polacek <polacek@redhat.com>
1310
1311 PR c/61852
1312 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1313 (implicitly_declare): Pass location to implicit_decl_warning.
1314
b108f48f
JJ
13152014-07-14 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR middle-end/61294
1318 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1319 If non-NULL, call c_parser_check_literal_zero.
1320 (c_parser_check_literal_zero): New function.
1321 (c_parser_postfix_expression_after_primary): Adjust
1322 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1323
773ec47f
MP
13242014-07-06 Marek Polacek <polacek@redhat.com>
1325
1326 PR c/6940
1327 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1328 * c-tree.h (C_ARRAY_PARAMETER): Define.
1329 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1330 function parameter.
1331
22e1cf1c
JH
13322014-07-02 Jan Hubicka <hubicka@ucw.cz>
1333 Chen Gang <gang.chen.5i5j@gmail.com>
1334
1335 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1336 releasing symbol.
1337
52ec0ea3
MP
13382014-07-01 Marek Polacek <polacek@redhat.com>
1339
1340 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1341 instead of 0 to WARN_FOR_ASSIGNMENT.
1342
d5c3d343
MP
13432014-07-01 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/58286
1346 * c-typeck.c (convert_for_assignment): Pass
1347 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1348
6a7253a4
MP
13492014-06-30 Marek Polacek <polacek@redhat.com>
1350
1351 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1352 has no_sanitize_undefined attribute.
1353
5e88a8f4
IZ
13542014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1355
1356 PR middle-end/57541
1357 * c-array-notation.c (fix_builtin_array_notation_fn):
1358 Check for 0 arguments in builtin call. Check that bultin argument is
1359 correct.
1360 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1361 index.
1362
9698b078
SH
13632014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1364
1365 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1366 qualifiers in __auto_type for atomic types.
1367 (c_parser_typeof_specifier): Discard all type qualifiers in
1368 __typeof__ for atomic types.
1369
6e07c515
MP
13702014-06-25 Marek Polacek <polacek@redhat.com>
1371
1372 PR c/61162
1373 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1374 the return expression to c_finish_return.
1375
da6f124d
JJ
13762014-06-25 Jakub Jelinek <jakub@redhat.com>
1377
1378 * c-typeck.c (c_finish_omp_clauses): Make sure
1379 OMP_CLAUSE_LINEAR_STEP has correct type.
1380
c203e8a7
TS
13812014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1382
1383 * c-decl.c: Adjust.
1384
56ad0e38
JJ
13852014-06-24 Jakub Jelinek <jakub@redhat.com>
1386
1387 * c-parser.c (c_parser_omp_for_loop): For
1388 #pragma omp parallel for simd move lastprivate clause from parallel
1389 to for rather than simd.
1390
47c2554f
MP
13912014-06-23 Marek Polacek <polacek@redhat.com>
1392
1393 * c-typeck.c (parser_build_binary_op): Don't call
1394 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1395
56363ffd
JH
13962014-06-15 Jan Hubicka <hubicka@ucw.cz>
1397
1398 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1399 * c-decl.c (merge_decls): Likewise.
1400
d7ff7ae5
MP
14012014-06-09 Marek Polacek <polacek@redhat.com>
1402
1403 PR c/36446
1404 * c-typeck.c (error_init): Call inform instead of error_at.
1405 (pedwarn_init): Call inform instead of pedwarn.
1406 (warning_init): Call inform instead of warning_at.
1407
24d047a3
JH
14082014-06-07 Jan Hubicka <hubicka@ucw.cz>
1409
1410 * c-decl.c (merge_decls): Use set_decl_section_name.
1411 (duplicate_decls): Remove node if it exists.
1412
9bac5cbb
G
14132014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1414
1415 PR c/53119
1416 * c-typeck.c (push_init_level, process_init_element,
1417 pop_init_level): Correct check for zero initialization, move
1418 missing brace warning to respect zero initialization.
1419
8ffcdea8
MP
14202014-06-05 Marek Polacek <polacek@redhat.com>
1421
1422 PR c/56724
1423 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1424
742938c9
MP
14252014-06-05 Marek Polacek <polacek@redhat.com>
1426
1427 PR c/49706
1428 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1429 on the left hand side operand of a comparison.
1430
6447c55d
MP
14312014-06-05 Marek Polacek <polacek@redhat.com>
1432
1433 PR c/48062
1434 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1435 Print note only if the warning was printed.
1436
9dc7743c
IZ
14372014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1438
1439 PR c/58942
1440 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1441 with a pointer.
1442
fedfecef
MP
14432014-06-03 Marek Polacek <polacek@redhat.com>
1444
1445 PR c/60439
1446 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1447 c_start_case.
1448 * c-tree.h (c_start_case): Update.
1449 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1450 switch condition has boolean value.
1451
9b2b7279
AM
14522014-06-02 Andrew MacLeod <amacleod@redhat.com>
1453
1454 * c-decl.c: Include builtins.h.
1455 * c-parser.c: Likewise.
1456
5c1bc275
MP
14572014-05-27 Marek Polacek <polacek@redhat.com>
1458
1459 PR c/56724
1460 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1461 error and warning calls to error_at and warning_at. Pass location of
1462 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1463 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1464 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1465
97563bc8
IZ
14662014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1467
1468 PR c/61191
1469 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1470 function parameters.
1471
aede2c10
JH
14722014-05-23 Jan Hubicka <hubicka@ucw.cz>
1473
1474 * c-decl.c (merge_decls): Preserve symtab node pointers.
1475 (duplicate_decls): Free new decl.
1476
edbba2ce
TS
14772014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1478
f3316c6d
TS
1479 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1480 initialization.
1481
edbba2ce
TS
1482 * c-parser.c (c_parser_omp_target): Return bool values.
1483
68c81f24
TS
14842014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1485
1486 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1487 num_teams_loc variable to num_thread_limit_loc.
1488
632f2871
RS
14892014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1490
1491 * c-array-notation.c (expand_array_notations): Use void_node
1492 instead of void_zero_node.
1493
766090c2
TS
14942014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1495
1496 * c-decl.c (finish_struct): Adjust.
1497 (finish_enum): Likewise.
1498 (bind): Adjust.
1499 (record_inline_static): Likewise.
1500 (push_scope): Likewise.
1501 (make_label): Likewise.
1502 (lookup_label_for_goto): Likewise.
1503 (finish_struct): Likewise.
1504 (finish_enum): Likewise.
1505 (store_parm_decls): Likewise.
1506 (c_push_function_context): Likewise.
1507 * c-lang.h: Remove usage of variable_size gty attribute.
1508 * c-parser.c (c_parse_init): Adjust.
1509 (c_parse_file): Likewise.
1510
2b107f6b
MP
15112014-05-13 Marek Polacek <polacek@redhat.com>
1512
1513 PR c/61162
1514 * c-typeck.c (convert_for_assignment): Pass location to
1515 WARN_FOR_ASSIGNMENT instead of input_location.
1516
d033409e
MP
15172014-05-10 Marek Polacek <polacek@redhat.com>
1518
1519 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1520 maybe_warn_string_init.
1521 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1522 maybe_warn_string_init.
1523 * c-tree.h (maybe_warn_string_init): Update declaration.
1524 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1525 Call pedwarn_init with loc instead of with input_location.
1526 (digest_init): Pass init_loc to maybe_warn_string_init.
1527 (pop_init_level): Call pedwarn_init with loc instead of with
1528 input_location.
1529 (set_init_index): Likewise.
1530 (process_init_element): Likewise.
1531
ea58ef42
MP
15322014-05-09 Marek Polacek <polacek@redhat.com>
1533
1534 PR c/61096
1535 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1536 (c_parser_initelt): Pass location to set_init_label. Pass array index
1537 location to set_init_index.
1538 * c-tree.h (push_init_level): Update declaration.
1539 (pop_init_level): Likewise.
1540 (set_init_index): Likewise.
1541 (set_init_label): Likewise.
1542 * c-typeck.c (error_init): Add location parameter. Call error_at
1543 instead of error.
1544 (digest_init): Pass init_loc to error_init.
1545 (really_start_incremental_init):
1546 (push_init_level): Add location parameter. Pass loc to pop_init_level
1547 and error_init.
1548 (pop_init_level): Likewise.
1549 (set_designator): Add location parameter. Pass loc to pop_init_level,
1550 push_init_level, and error_init.
1551 (set_init_index): Add location parameter. Pass loc to error_init and
1552 set_designator.
1553 (set_init_label): Likewise.
1554 (output_init_element): Pass loc to error_init.
1555 (process_init_element): Pass loc to error_init, pop_init_level,
1556 pedwarn_init, and push_init_level.
1557
661a0813
MP
15582014-05-09 Marek Polacek <polacek@redhat.com>
1559
1560 PR c/50459
1561 * c-parser.c (c_parser_attributes): Parse the arguments as an
1562 expression-list if the attribute takes identifier.
1563
2793eeab
MP
15642014-05-08 Marek Polacek <polacek@redhat.com>
1565
1566 PR c/61053
1567 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1568 TYPE_ALIGN_UNIT.
1569
f827930a
MP
15702014-05-08 Marek Polacek <polacek@redhat.com>
1571
1572 PR c/61077
1573 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1574 of main.
1575
1d60af08
KZ
15762014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1577 Mike Stump <mikestump@comcast.net>
1578 Richard Sandiford <rdsandiford@googlemail.com>
1579
1580 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1581 (finish_enum): Use wide-int interfaces.
1582 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1583 * c-typeck.c (build_c_cast): Likewise.
1584 (set_nonincremental_init_from_string): Likewise.
1585 (c_tree_equal): Likewise.
1586
a0e24419
MP
15872014-05-02 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/25801
1590 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1591 Return size_one_node when the type is not complete.
1592 (pointer_diff): Remove comment.
1593 (build_unary_op): Improve error messages.
1594
19fc9faa
MP
15952014-05-02 Marek Polacek <polacek@redhat.com>
1596
1597 * c-typeck.c (c_finish_return): Separate warning_at calls.
1598
63bc4e87
MP
15992014-05-02 Marek Polacek <polacek@redhat.com>
1600
1601 * c-tree.h (error_init): Remove declaration.
1602 (pedwarn_init): Likewise.
1603 * c-typeck.c (error_init): Make static and move above.
1604 (pedwarn_init): Likewise.
1605 (warning_init): Move above.
1606 (maybe_warn_string_init): Likewise.
1607
4bd2511b
JL
16082014-05-01 Jeff Law <law@redhat.com>
1609
1610 Revert:
1611
1612 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1613 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1614 avoid goto.
1615
6a358dcb
MP
16162014-05-02 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/60784
1619 * c-typeck.c (push_init_level): Set constructor_designated to
1620 p->designated for structures.
1621
ae5ebda4
MP
16222014-05-01 Marek Polacek <polacek@redhat.com>
1623
1624 PR c/60915
1625 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1626 function-definition has an attribute after the declarator.
1627
96b40f8d
MP
16282014-05-01 Marek Polacek <polacek@redhat.com>
1629
1630 PR c/60257
1631 * c-typeck.c (warning_init): Add location_t parameter. Call
1632 warning_at instead of warning.
1633 (push_init_level): Pass input_location to warning_init.
1634 (add_pending_init): Add location_t parameter. Pass loc to
1635 warning_init.
1636 (set_nonincremental_init): Pass input_location to add_pending_init.
1637 (set_nonincremental_init_from_string): Likewise.
1638 (output_init_element): Pass loc to warning_init and to
1639 add_pending_init.
1640
32e00768
MP
16412014-05-01 Marek Polacek <polacek@redhat.com>
1642
1643 PR c/43395
1644 * c-typeck.c (c_finish_return): Distinguish between label and variable
1645 when warning about returning local address.
1646
c9379ce2
MP
16472014-05-01 Marek Polacek <polacek@redhat.com>
1648
1649 PR c/29467
1650 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1651 in C89 mode.
1652
d00887e8
MP
16532014-05-01 Marek Polacek <polacek@redhat.com>
1654
1655 PR c/43245
1656 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1657 instead of 0 to WARN_FOR_QUALIFIERS.
1658
5436fa2e
MP
16592014-05-01 Marek Polacek <polacek@redhat.com>
1660
1661 PR c/56989
1662 * c-typeck.c (default_conversion): Use better location for
1663 error call.
1664
f8ed5150
MP
16652014-04-30 Marek Polacek <polacek@redhat.com>
1666
1667 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1668 also when SANITIZE_FLOAT_DIVIDE is on.
1669
8337d1db
MP
16702014-04-30 Marek Polacek <polacek@redhat.com>
1671
1672 PR c/60139
1673 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1674 and pedwarn_init. Use loc insted of input_location.
1675
c4bdc42f
MP
16762014-04-30 Marek Polacek <polacek@redhat.com>
1677
1678 PR c/60351
1679 * c-typeck.c (build_binary_op): Use location when warning about
1680 shift count.
1681
45484dcf
MP
16822014-04-25 Marek Polacek <polacek@redhat.com>
1683
1684 PR c/18079
1685 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1686 always_inline/noinline and hot/cold attributes.
1687
34cf811f
MP
16882014-04-25 Marek Polacek <polacek@redhat.com>
1689
1690 PR c/60114
1691 * c-parser.c (c_parser_initelt): Pass input_location to
1692 process_init_element.
1693 (c_parser_initval): Pass loc to process_init_element.
1694 * c-tree.h (process_init_element): Adjust declaration.
1695 * c-typeck.c (push_init_level): Pass input_location to
1696 process_init_element.
1697 (pop_init_level): Likewise.
1698 (set_designator): Likewise.
1699 (output_init_element): Add location_t parameter. Pass loc to
1700 digest_init.
1701 (output_pending_init_elements): Pass input_location to
1702 output_init_element.
1703 (process_init_element): Add location_t parameter. Pass loc to
1704 output_init_element.
1705
42056eac
JJ
17062014-04-24 Jakub Jelinek <jakub@redhat.com>
1707
1708 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1709 atomic-clause, allow comma in between atomic-clause and
1710 seq_cst.
1711
e162a134
JJ
17122014-04-22 Jakub Jelinek <jakub@redhat.com>
1713
1714 PR c/59073
1715 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1716 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1717
2f6babac
IZ
17182014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1719
1720 PR middle-end/60469
1721 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1722 create_tmp_var instead build_decl for creating temps.
1723 (build_array_notation_expr): Likewise.
1724 (fix_conditional_array_notations_1): Likewise.
1725 (fix_array_notation_expr): Likewise.
1726 (fix_array_notation_call_expr): Likewise.
1727
8edbfaa6
JJ
17282014-03-28 Jakub Jelinek <jakub@redhat.com>
1729
1730 PR c++/60689
1731 * c-tree.h (c_build_function_call_vec): New prototype.
1732 * c-typeck.c (build_function_call_vec): Don't call
1733 resolve_overloaded_builtin here.
1734 (c_build_function_call_vec): New wrapper function around
1735 build_function_call_vec. Call resolve_overloaded_builtin here.
1736 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1737 Call c_build_function_call_vec instead of build_function_call_vec.
1738 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1739 * c-decl.c (finish_decl): Likewise.
1740
7485aeea
MLI
17412014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1742
1743 PR c/55383
1744 * c-typeck.c: Use correct format string in cast-qual warning
1745
b17a8b07
TS
17462014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1747
1748 * c-decl.c (c_decl_attributes): Use
1749 lang_hooks.types.omp_mappable_type.
1750 * c-typeck.c (c_finish_omp_clauses): Likewise.
1751
3af9c5e9
MP
17522014-03-06 Marek Polacek <polacek@redhat.com>
1753
1754 PR c/60197
1755 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1756 of checking tree code.
1757
1c9f5f33
PK
17582014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1759
1760 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1761 (c_parser_parameter_declaration): Likewise.
1762
cc28fc7f
MP
17632014-02-19 Marek Polacek <polacek@redhat.com>
1764
1765 PR c/60195
1766 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1767 Call mark_exp_read on exp.value.
1768 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1769 TREE_ADDRESSABLE on old instead of val.
1770 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1771
b581c05c
PK
17722014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1773
1774 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1775 C_EXPR_APPEND by vec_safe_push.
1776 * c-tree.h (C_EXPR_APPEND): Remove.
1777
81e5eca8
MP
17782014-01-31 Marek Polacek <polacek@redhat.com>
1779
1780 PR c/59963
1781 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1782 build_function_call_vec.
1783 (build_function_call): Likewise.
1784 (build_atomic_assign): Likewise.
1785 (build_function_call_vec): Add arg_loc parameter. Use it.
1786 (convert_arguments): Likewise.
1787 (convert_for_assignment): Rename rhs_loc to expr_loc.
1788 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1789 (c_parser_objc_keywordexpr): Likewise.
1790 (c_parser_postfix_expression_after_primary): Call
1791 build_function_call_vec with expr_loc rather than op_loc.
1792 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1793 build_function_call_vec.
1794 (c_parser_expr_list): Add locations parameter. Fill it with locations
1795 of function arguments.
1796 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1797
68fca595
MP
17982014-01-30 Marek Polacek <polacek@redhat.com>
1799
1800 PR c/59940
1801 * c-typeck.c (build_function_call_vec): Use loc parameter.
1802 (convert_arguments): Add location parameter. Use it.
1803 (ep_convert_and_check): Likewise.
1804 (build_atomic_assign): Adjust convert_for_assignment call.
1805 (build_modify_expr): Likewise.
1806 (digest_init): Likewise.
1807 (c_finish_return): Likewise.
1808 (build_conditional_expr): Adjust ep_convert_and_check calls.
1809 (convert_for_assignment): Add rhs_loc parameter. Use it.
1810 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1811 calls.
1812
fa337f3a
RB
18132014-01-30 Richard Biener <rguenther@suse.de>
1814
1815 PR c/59905
1816 * c-typeck.c (build_function_call_vec): Do not replace calls
1817 to a function via an incompatible type with a runtime abort.
1818
b72271b9
BI
18192014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1820
1821 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1822 flag_enable_cilkplus with flag_cilkplus.
1823 (c_parser_direct_declarator_inner): Likewise.
1824 (c_parser_attribute_any_word): Likewise.
1825 (c_parser_attributes): Likewise.
1826 (c_parser_compound_statement): Likewise.
1827 (c_parser_statement_after_labels): Likewise.
1828 (c_parser_if_statement): Likewise.
1829 (c_parser_switch_statement): Likewise.
1830 (c_parser_do_statement): Likewise.
1831 (c_parser_for_statement): Likewise.
1832 (c_parser_unary_expression): Likewise.
1833 (c_parser_postfix_expression): Likewise.
1834 (c_parser_postfix_expression_after_primary): Likewise.
1835 (c_parser_postfix_expression_after_primary): Likewise.
1836 (c_parser_omp_clause_name): Likewise.
1837 (c_finish_omp_declare_simd): Likewise.
1838 (c_parser_cilk_verify_simd): Likewise.
1839 * c-typeck.c (build_array_ref): Likewise.
1840 (build_function_call_vec): Likewise.
1841 (convert_arguments): Likewise.
1842 (build_compound_expr): Likewise.
1843 (c_finish_return): Likewise.
1844 (c_finish_if_stmt): Likewise.
1845 (c_finish_loop): Likewise.
1846 (build_binary_op): Likewise.
1847
393e8e8b
MP
18482014-01-23 Marek Polacek <polacek@redhat.com>
1849
1850 PR c/59846
1851 * c-typeck.c (parser_build_binary_op): Use location instead of
1852 input_location.
1853 (build_binary_op): Pass location to shorten_compare.
1854
f04dda30
MP
18552014-01-23 Marek Polacek <polacek@redhat.com>
1856
1857 PR c/58346
1858 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1859 an empty aggregate.
1860
789eadcd
MP
18612014-01-23 Marek Polacek <polacek@redhat.com>
1862
1863 PR c/59871
1864 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1865 of a comma expression.
1866 (emit_side_effect_warnings): Likewise.
1867
40f14e9f
BI
18682014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1869
1870 PR c/59825
1871 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1872 function to use walk_tree and moved a lot of its functionality to
1873 expand_array_notations.
1874 (expand_array_notations): New function.
1875
74558dd9
BI
18762014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1877
1878 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1879 attribute an attribute without value.
1880
652fea39
JJ
18812014-01-23 Jakub Jelinek <jakub@redhat.com>
1882
1883 PR middle-end/58809
1884 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1885 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1886
f34f1c87
MP
18872014-01-22 Marek Polacek <polacek@redhat.com>
1888
1889 PR c/59891
1890 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1891 of remove_c_maybe_const_expr on op1 and op2.
1892
241f845a
JJ
18932014-01-15 Jakub Jelinek <jakub@redhat.com>
1894
1895 PR c/58943
1896 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1897 effects, preevaluate rhs using SAVE_EXPR first.
1898
9a74f20c
BI
18992014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1900
1901 PR c++/59631
1902 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1903 statements with if-elseif statements.
1904
96066ce1
MP
19052014-01-06 Marek Polacek <polacek@redhat.com>
1906
1907 PR c/57773
1908 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1909 defined bit-field types only in ISO C.
1910
23a5b65a
RS
19112014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1912
1913 Update copyright years
1914
f9030485
RS
19152014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1916
1917 * c-array-notation.c: Use the standard form for the copyright notice.
1918
41958c28
BI
19192013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1920
1921 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1922 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1923 field in parser is not empty. If not-empty, call the function
1924 c_parser_finish_omp_declare_simd.
1925 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1926 between SIMD-enabled functions and #pragma simd. Added new parameter.
1927 (c_parser_cilk_all_clauses): Modified the usage of the function
1928 c_parser_cilk_clause_vectorlength as mentioned above.
1929 (c_parser_cilk_simd_fn_vector_attrs): New function.
1930 (c_finish_cilk_simd_fn_tokens): Likewise.
1931 (is_cilkplus_vector_p): Likewise.
1932 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1933 "nomask," and "mask" strings in clause name.
1934 (c_parser_omp_all_clauses): Added 3 new case statements:
1935 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1936 PRAGMA_CILK_CLAUSE_NOMASK.
1937 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1938 check for vector attribute and if so call the function
1939 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1940 called the function c_finish_cilk_simd_fn_tokens.
1941 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1942 parser field is non-empty. If so, parse them as you would parse
1943 the omp declare simd pragma.
1944 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1945 Added a check when step is a parameter and flag it as error.
1946 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1947 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1948 pragma_omp_clause.
1949
cef0fd0e
TS
19502013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1951
1952 * c-parser.c (c_parser_omp_parallel): Fix description.
1953
12893402
BI
19542013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1955
1956 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1957 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1958 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1959 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1960
296674db
JM
19612013-12-04 Joseph Myers <joseph@codesourcery.com>
1962
1963 PR c/52023
1964 * c-parser.c (c_parser_alignas_specifier): Use
1965 c_sizeof_or_alignof_type instead of c_alignof.
1966 (c_parser_alignof_expression): Likewise, with min_alignof
1967 parameter depending on alignof spelling used.
1968
edd28054
MP
19692013-12-04 Marek Polacek <polacek@redhat.com>
1970
1971 PR c/54113
1972 * c-decl.c (start_function): Don't warn for missing prototype for
1973 inline functions.
1974
da0fc454
MP
19752013-12-03 Marek Polacek <polacek@redhat.com>
1976
1977 PR c/59351
1978 * c-decl.c (build_compound_literal): Allow compound literals with
1979 empty initial value.
1980
4c2ecab0
JM
19812013-12-02 Joseph Myers <joseph@codesourcery.com>
1982
1983 PR c/58235
1984 * c-typeck.c (build_modify_expr): Diagnose assignment to
1985 expression with array type.
1986
340baef7
JM
19872013-11-29 Joseph Myers <joseph@codesourcery.com>
1988
1989 PR c/42262
1990 * c-typeck.c (process_init_element): Do not treat a string as
1991 initializing a whole array when used with a designator for an
1992 individual element.
1993
6763b9f7
JM
19942013-11-29 Joseph Myers <joseph@codesourcery.com>
1995
1996 PR c/57574
1997 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1998 an inline function following a static declaration.
1999
e7bd1de1
JJ
20002013-11-28 Jakub Jelinek <jakub@redhat.com>
2001
2002 PR c/59310
2003 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2004 to p_name before calling c_parser_omp_teams instead of after.
2005 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2006 argument. Remove unused p_name variable.
2007
0136f8f0
AH
20082013-11-27 Aldy Hernandez <aldyh@redhat.com>
2009 Jakub Jelinek <jakub@redhat.com>
2010
2011 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2012 external_scope is NULL.
2013
241b71bb
TV
20142013-11-27 Tom de Vries <tom@codesourcery.com>
2015 Marc Glisse <marc.glisse@inria.fr>
2016
2017 PR c++/59032
2018 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2019
2fb9a547
AM
20202013-11-22 Andrew MacLeod <amacleod@redhat.com>
2021
2022 * c-typeck.c: Add required include files from gimple.h.
2023
8400e75e
DM
20242013-11-22 David Malcolm <dmalcolm@redhat.com>
2025
2026 * c-decl.c (define_label, shadow_tag_warned)
2027 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2028 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2029 (declspecs_add_type): Remove use of in_system_header macro.
2030 * c-parser.c (c_parser_unary_expression): Likewise.
2031 * c-typeck.c (store_init_value, process_init_element)
2032 (c_start_case): Likewise.
2033
2034 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2035 macro.
2036
2037 * c-parser.c (c_parser_set_source_position_from_token): Remove
2038 reference to in_system_header from comment.
2039
386b1f1f
RS
20402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2041
2042 * c-decl.c (grokdeclarator): Update comment to refer to
2043 tree_to_[su]hwi rather than tree_low_cst.
2044
ae7e9ddd
RS
20452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2046
2047 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2048 tree_to_uhwi throughout.
2049
9439e9a1
RS
20502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2051
2052 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2053 throughout.
2054
9541ffee
RS
20552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2056
2057 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2058 throughout.
2059
c02065fc
AH
20602013-11-15 Aldy Hernandez <aldyh@redhat.com>
2061
2062 * c-parser.c (c_parser_cilk_simd): New.
2063 (c_parser_cilk_verify_simd): New.
2064 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2065 (c_parser_omp_for_loop): Add case for NE_EXPR.
2066 Set c_break_label for CILK_SIMD.
2067 (c_parser_cilk_clause_vectorlength): New.
2068 (c_parser_cilk_clause_linear): New.
2069 (c_parser_cilk_clause_name): New.
2070 (c_parser_cilk_all_clauses): New.
2071 * c-typeck.c (build_unary_op): Pass location argument to
2072 readonly_error.
2073 (build_modify_expr): Same.
2074 (build_asm_expr): Same.
2075 (c_finish_bc_stmt): Error on break/continue in loops.
2076
18f429e2
AM
20772013-11-14 Andrew MacLeod <amacleod@redhat.com>
2078
2079 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2080
d8a2d370
DN
20812013-11-14 Diego Novillo <dnovillo@google.com>
2082
2083 * c-decl.c: Include print-tree.h.
2084 Include stor-layout.h.
2085 Include varasm.h.
2086 Include attribs.h.
2087 Include stringpool.h.
2088 * c-lang.c: Include fold-const.h.
2089 * c-parser.c: Include stringpool.h.
2090 Include attribs.h.
2091 Include stor-layout.h.
2092 Include varasm.h.
2093 Include trans-mem.h.
2094 * c-typeck.c: Include stor-layout.h.
2095 Include trans-mem.h.
2096 Include varasm.h.
2097 Include stmt.h.
2098
38b7bc7f
JM
20992013-11-13 Joseph Myers <joseph@codesourcery.com>
2100
2101 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2102 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2103 __auto_type.
2104 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2105 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2106 RID_AUTO_TYPE.
2107 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2108 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2109 (c_parser_declarator, c_parser_direct_declarator_inner)
2110 (c_parser_parameter_declaration, c_parser_type_name): All callers
2111 changed.
2112 (c_parser_declaration_or_fndef): Handle declarations with type
2113 determined from the initializer.
2114
45b0be94
AM
21152013-11-12 Andrew MacLeod <amacleod@redhat.com>
2116
18f429e2 2117 * c-typeck.c: Include gimplify.h.
45b0be94 2118
582d9b50
JM
21192013-11-12 Joseph Myers <joseph@codesourcery.com>
2120
2121 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2122 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2123 comment.
2124 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2125 or _Thread_local as appropriate in diagnostics.
2126 (build_null_declspecs): Initialize ret->thread_gnu_p.
2127 (declspecs_add_scspec): Handle either __thread or _Thread_local
2128 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2129 pedantic. Do not disallow _Thread_local extern and _Thread_local
2130 static.
2131
267bac10
JM
21322013-11-07 Joseph Myers <joseph@codesourcery.com>
2133 Andrew MacLeod <amacleod@redhat.com>
2134
2135 * c-aux-info.c (gen_type): Handle atomic qualifier.
2136 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2137 qualifiers when compating types.
2138 (shadow_tag_warned): Handle atomic_p in declspecs.
2139 (quals_from_declspecs): Likewise.
2140 (start_decl): Use c_type_promotes_to when promoting argument
2141 types.
2142 (grokdeclarator): Handle _Atomic.
2143 (get_parm_info): Diagnose any qualifier on "void" as only
2144 parameter.
2145 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2146 comparing types. Use c_type_promotes_to when promoting argument
2147 types.
2148 (finish_function): Use c_type_promotes_to when promoting argument
2149 types.
2150 (build_null_declspecs): Handle atomic_p in declspecs.
2151 (declspecs_add_qual): Handle RID_ATOMIC.
2152 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2153 (c_token_starts_declspecs): Handle RID_ATOMIC.
2154 (c_parser_declspecs): Handle atomic type specifiers and
2155 qualifiers.
2156 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2157 from types of expressions with atomic type.
2158 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2159 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2160 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2161 (c_parser_statement_after_labels, c_parser_switch_statement)
2162 (c_parser_for_statement, c_parser_expr_no_commas)
2163 (c_parser_conditional_expression, c_parser_binary_expression)
2164 (c_parser_cast_expression, c_parser_unary_expression)
2165 (c_parser_postfix_expression)
2166 (c_parser_postfix_expression_after_primary, c_parser_expression):
2167 Use convert_lvalue_to_rvalue.
2168 (c_parser_expression_conv, c_parser_expr_list): Document
2169 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2170 (c_parser_objc_synchronized_statement): Use
2171 convert_lvalue_to_rvalue.
2172 (c_parser_objc_selector): Handle RID_ATOMIC.
2173 (c_parser_objc_receiver, c_parser_array_notation): Use
2174 convert_lvalue_to_rvalue.
2175 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2176 _Atomic (type-name).
2177 (struct c_declspecs): Add atomic_p field.
2178 (convert_lvalue_to_rvalue): Declare.
2179 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2180 corresponding atomic types.
2181 (qualify_type): Don't add _Atomic qualifiers from second argument.
2182 (comp_target_types): Do not allow _Atomic mismatches.
2183 (type_lists_compatible_p): Do not remove atomic qualifiers when
2184 comparing types.
2185 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2186 (build_atomic_assign): New functions.
2187 (build_unary_op): Use build_atomic_assign for atomic increment and
2188 decrement.
2189 (build_conditional_expr): Do not treat _Atomic void as a qualified
2190 version of void.
2191 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2192 (find_anonymous_field_with_type, convert_to_anonymous_field)
2193 (convert_for_assignment): Do not remove atomic qualifiers when
2194 comparing types.
2195 (digest_init): Do not accept initialization of arrays of atomic
2196 elements by string constants.
2197 (build_asm_expr): Use convert_lvalue_to_rvalue.
2198 (build_binary_op): Do not treat _Atomic void as a qualified
2199 version of void.
2200
0c249d4b
DD
22012013-11-06 DJ Delorie <dj@redhat.com>
2202
2203 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2204 both explicit and builtin, print the location of the explicit one.
2205
6d7f7e0a
TB
22062013-11-05 Tobias Burnus <burnus@net-b.de>
2207
2208 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2209 c_parser_omp_distribute, c_parser_omp_teams,
2210 c_parser_omp_target, c_parser_omp_declare): Handle
2211 -fopenmp-simd.
2212
b906f4ca
MP
22132013-11-03 Marek Polacek <polacek@redhat.com>
2214
2215 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2216
ee1d5a02
JJ
22172013-11-01 Jakub Jelinek <jakub@redhat.com>
2218
2219 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2220 check_dup_generic at the end, unless remove is true.
2221 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2222 remove = true;.
2223 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2224
5a9785fb
JJ
22252013-10-31 Jakub Jelinek <jakub@redhat.com>
2226
2227 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2228 with decl that is not pointer nor array.
2229
939b37da
BI
22302013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2231
2232 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2233 a spawning function is found.
2234 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2235 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2236 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2237 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2238 case.
2239 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2240 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2241 expr.
2242 (c_finish_return): Added a check to reject _Cilk_spawn in return
2243 expression.
2244 (build_cilk_spawn): New function.
2245 (build_cilk_sync): Likewise.
2246 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2247
d4af74d4
TB
22482013-10-27 Tobias Burnus <burnus@net-b.de>
2249
2250 PR other/33426
2251 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2252 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2253 (c_parser_statement_after_labels): Update calls.
2254
d73749df 22552013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2256
2257 PR other/33426
2258 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2259 Handle PRAGMA_IVDEP.
2260 (c_parser_statement_after_labels): Update call.
2261
f28aa681
MP
22622013-10-24 Marek Polacek <polacek@redhat.com>
2263
2264 * c-parser.c (c_parser_struct_declaration): Add a comment.
2265 (c_parser_declarator): Don't allow _Alignas here.
2266
0645c1a2
AM
22672013-10-17 Andrew MacLeod <amacleod@redhat.com>
2268
2269 * c-parser.c: Include omp-low.h.
2270 * c-typeck.c: Likewise.
2271
568a31f2
MP
22722013-10-17 Marek Polacek <polacek@redhat.com>
2273
2274 PR c/58267
2275 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2276 Document syntax of the array-declarator.
2277 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2278 are not permitted.
2279 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2280 (c_parser_struct_declaration): Likewise.
2281 (c_parser_declarator): Likewise.
2282 (c_parser_direct_declarator_inner): Likewise.
2283 (c_parser_parameter_declaration): Likewise.
2284 (c_parser_type_name): Likewise.
2285
acf0174b
JJ
22862013-10-11 Jakub Jelinek <jakub@redhat.com>
2287
2288 * c-lang.h (current_omp_declare_target_attribute): New extern
2289 decl.
2290 * c-parser.c: Include c-lang.h.
2291 (struct c_parser): Change tokens to c_token *.
2292 Add tokens_buf field. Change tokens_avail type to unsigned int.
2293 (c_parser_consume_token): If parser->tokens isn't
2294 &parser->tokens_buf[0], increment parser->tokens.
2295 (c_parser_consume_pragma): Likewise.
2296 (enum pragma_context): Add pragma_struct and pragma_param.
2297 (c_parser_external_declaration): Adjust
2298 c_parser_declaration_or_fndef caller.
2299 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2300 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2301 Adjust recursive call.
2302 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2303 of pragma_external.
2304 (c_parser_parameter_declaration): Use pragma_param instead of
2305 pragma_external.
2306 (c_parser_compound_statement_nostart, c_parser_label,
2307 c_parser_for_statement): Adjust
2308 c_parser_declaration_or_fndef callers.
2309 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2310 it through to c_parser_conditional_expression.
2311 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2312 pass it through to c_parser_binary_expression. Adjust recursive
2313 call.
2314 (c_parser_binary_expression): Remove prec argument, add
2315 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2316 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2317 binop matches it, use build2 instead of parser_build_binary_op.
2318 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2319 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2320 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2321 Handle pragma_struct and pragma_param the same as pragma_external.
2322 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2323 (c_parser_omp_variable_list): Parse array sections for
2324 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2325 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2326 (c_parser_omp_clause_reduction): Handle user defined reductions.
2327 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2328 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2329 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2330 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2331 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2332 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2333 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2334 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2335 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2336 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2337 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2338 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2339 (c_parser_omp_for_loop): Add CODE argument, pass it through
2340 to c_finish_omp_for. Change last argument to cclauses,
2341 and adjust uses to grab parallel clauses from the array of all
2342 the split clauses. Adjust c_parser_binary_expression,
2343 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2344 (omp_split_clauses): New function.
2345 (c_parser_omp_simd): New function.
2346 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2347 Allow the function to be called also when parsing combined constructs,
2348 and call c_parser_omp_simd when parsing for simd.
2349 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2350 #pragma omp section, require exactly one structured-block instead of
2351 sequence of statements.
2352 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2353 Allow the function to be called also when parsing combined constructs.
2354 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2355 Allow the function to be called also when parsing combined
2356 constructs.
2357 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2358 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2359 c_parser_omp_teams, c_parser_omp_target_data,
2360 c_parser_omp_target_update, c_parser_omp_target,
2361 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2362 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2363 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2364 (c_parser_omp_construct): Add p_name and mask vars. Handle
2365 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2366 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2367 and c_parser_omp_sections callers.
2368 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2369 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2370 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2371 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2372 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2373 OMP_CLAUSE_DEPEND.
2374 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2375 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2376 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2377 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2378 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2379 * c-typeck.c: Include tree-inline.h.
2380 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2381 handle_omp_array_sections_1, handle_omp_array_sections,
2382 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2383 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2384 user defined reductions.
2385 (c_tree_equal): New function.
2386 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2387 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2388 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2389 c_check_omp_declare_reduction_r): New prototypes.
2390 * c-decl.c (current_omp_declare_target_attribute): New variable.
2391 (c_decl_attributes): New function.
2392 (start_decl, start_function): Use it instead of decl_attributes.
2393 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2394 c_omp_reduction_decl, c_omp_reduction_lookup,
2395 c_check_omp_declare_reduction_r): New functions.
2396
0a6c2227
TT
23972013-09-25 Tom Tromey <tromey@redhat.com>
2398
2399 * Make-lang.in (c/gccspec.o): Remove.
2400 (CFLAGS-c/gccspec.o): New variable.
2401 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2402 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2403 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2404
f3bc55f0
TT
24052013-09-25 Tom Tromey <tromey@redhat.com>
2406
2407 * Make-lang.in (c/gccspec.o): Don't use subshell.
2408
a24d975c
MP
24092013-09-18 Marek Polacek <polacek@redhat.com>
2410
2411 PR sanitize/58443
2412 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2413 Remove unnecessary check.
2414
ce6923c5
MP
24152013-09-18 Marek Polacek <polacek@redhat.com>
2416
2417 PR sanitizer/58411
2418 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2419 no_sanitize_undefined attribute.
2420
a1e51df9
KT
24212013-09-13 Kai Tietz <ktietz@redhat.com>
2422
2423 PR target/57848
2424 * c-decl.c (c_builtin_function_ext_scope): Remove
2425 wrong assumption that it is never called on prexisting
2426 symbol.
2427
0af94e6f
JR
24282013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2429
2430 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2431
20059c8b
GDR
24322013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2433
2434 * c-objc-common.c (c_tree_printer): Tidy.
2435
de5a5fa1
MP
24362013-08-30 Marek Polacek <polacek@redhat.com>
2437
2438 * c-typeck.c (build_binary_op): Add division by zero and shift
2439 instrumentation.
2440
2531a1d9 24412013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2442 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2443
6e2bcc98 2444 PR c/35649
2531a1d9
JR
2445 * c-typeck.c (c_common_type): Prefer double_type_node over
2446 other REAL_TYPE types with the same precision.
2447 (convert_arguments): Likewise.
2448
025311c4
GDR
24492013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2450
2451 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2452 (c_initialize_diagnostics): Call a destructor for the early printer.
2453
da6ca2b5
GDR
24542013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2455
2456 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2457 printer initialization.
2458
318cda85 24592013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2460
318cda85
BI
2461 PR c/57490
2462 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2463 check for truth values.
2464 (expand_array_notation_exprs): Added truth values case. Removed an
2465 unwanted else. Added for-loop to walk through subtrees in default
2466 case.
2467
b066401f
GDR
24682013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2469
2470 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2471
fb48aadc
JM
24722013-07-23 Joseph Myers <joseph@codesourcery.com>
2473
2474 * c-parser.c (struct c_generic_association): Fix typo.
2475
433cc7b0
TT
24762013-07-23 Tom Tromey <tromey@redhat.com>
2477 Joseph Myers <joseph@codesourcery.com>
2478
2479 * c-parser.c (struct c_generic_association): New.
2480 (c_generic_association_d): New typedef.
2481 (c_parser_generic_selection): New function.
2482 (c_parser_postfix_expression): Handle RID_GENERIC.
2483
26d40c3d
JM
24842013-07-13 Jason Merrill <jason@redhat.com>
2485
2486 PR c++/57793
2487 * c-decl.c (finish_struct): Check for too-large class.
2488
ecdbd01a 24892013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2490
2491 PR c/57821
2492 * c-typeck.c (set_init_index): When folding, check for index overflow.
2493
1141ed3f
BI
24942013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2495
2496 * c-parser.c (c_parser_array_notation): Removed rejection of array
2497 notations in an array of function pointers.
2498
713b46fa
BI
24992013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2500
2501 * c-array-notation.c (make_triplet_val_inv): New function.
2502 (create_cmp_incr): Likewise.
2503 (create_array_refs): Likewise.
2504 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2505 Also modularized common parts between functions and called the function.
2506 (build_array_notation_expr): Likewise.
2507 (fix_conditional_array_notations_1): Likewise.
2508 (fix_array_notation_expr): Likewise.
2509 (fix_array_notation_call_expr): Likewise.
2510
92f20202
MP
25112013-06-18 Marek Polacek <polacek@redhat.com>
2512
2513 PR c/57630
2514 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2515
73a23b06
BI
25162013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2517
2518 * c-array-notation.c (build_array_notation_expr): Reject array notation
2519 mismatch between LHS and RHS even inside a call_expr. Also, removed
2520 a couple while statements that were dead code.
2521
00b8517d
BI
25222013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2523
2524 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2525 excessive precision expressions in function parameters. Also removed
2526 couple unwanted while statements.
2527
1509bdda
BI
25282013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2529
2530 * c-array-notation.c (expand_array_notation_exprs): Added
2531 ARRAY_NOTATION_REF case.
2532
d60f1706
BI
25332013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2534
2535 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2536 function to c-family/array-notation-common.c.
2537 (is_cilkplus_reduce_builtin): Likewise.
2538 (find_rank): Likewise.
2539 (extract_array_notation_exprs): Likewise.
2540 (replace_array_notations): Likewise.
2541 (find_inv_trees): Likewise.
2542 (replace_inv_trees): Likewise.
2543 (contains_array_notation_expr): Likewise.
2544 (find_correct_array_notation_type): Likewise.
2545 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2546 (struct inv_list): Moved this to c-family/array-notation-common.c.
2547 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2548
6d6efbb3
BI
25492013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2550
2551 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2552 reduction functions outside the for-loop. Added a check if the fundecl
2553 is non-NULL. Finally, removed an unwanted if-statement, and made the
2554 body unconditional.
2555
25c22937
BI
25562013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2557
2558 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2559 condition of the if-statement matches the rank of else-block and then-
2560 block when array notations are used.
2561 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2562 expression after the entire function body is parsed.
2563 (c_parser_expr_no_commas): Delayed creating array notation expressions
2564 to the end of function parsing.
2565 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2566 whole if-statement instead of just the condition.
2567 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2568
edd25645
BI
25692013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2570
2571 PR c/57474
2572 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2573 array to NULL_TREE if they are unused. Also added a check for the
2574 field to be NULL before its fields are used in future.
2575
065ce7f1
RO
25762013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2577
2578 PR bootstrap/57450
2579 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2580 (build_array_notation_expr): Likewise.
2581
36536d79
BI
25822013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2583
2584 * c-typeck.c (build_array_ref): Added a check to see if array's
2585 index is greater than one. If true, then emit an error.
2586 (build_function_call_vec): Exclude error reporting and checking
2587 for builtin array-notation functions.
2588 (convert_arguments): Likewise.
2589 (c_finish_return): Added a check for array notations as a return
2590 expression. If true, then emit an error.
2591 (c_finish_loop): Added a check for array notations in a loop
2592 condition. If true then emit an error.
2593 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2594 (build_binary_op): Added a check for array notation expr inside
2595 op1 and op0. If present, we call another function to find correct
2596 type.
2597 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2598 * c-parser.c (c_parser_compound_statement): Check if array
2599 notation code is used in tree, if so, then transform them into
2600 appropriate C code.
2601 (c_parser_expr_no_commas): Check if array notation is used in LHS
2602 or RHS, if so, then build array notation expression instead of
2603 regular modify.
2604 (c_parser_postfix_expression_after_primary): Added a check for
2605 colon(s) after square braces, if so then handle it like an array
2606 notation. Also, break up array notations in unary op if found.
2607 (c_parser_direct_declarator_inner): Added a check for array
2608 notation.
2609 (c_parser_compound_statement): Added a check for array notation in
2610 a stmt. If one is present, then expand array notation expr.
2611 (c_parser_if_statement): Likewise.
2612 (c_parser_switch_statement): Added a check for array notations in
2613 a switch statement's condition. If true, then output an error.
2614 (c_parser_while_statement): Similarly, but for a while.
2615 (c_parser_do_statement): Similarly, but for a do-while.
2616 (c_parser_for_statement): Similarly, but for a for-loop.
2617 (c_parser_unary_expression): Check if array notation is used in a
2618 pre-increment or pre-decrement expression. If true, then expand
2619 them.
2620 (c_parser_array_notation): New function.
2621 * c-array-notation.c: New file.
2622 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2623
cd192ccc
MS
26242013-05-23 Mike Stump <mikestump@comcast.net>
2625
2626 * c-typeck.c (convert_for_assignment): Handle references to memory
2627 spaces better.
2628
427b248d
JM
26292013-05-16 Jason Merrill <jason@redhat.com>
2630
2631 * Make-lang.in (cc1$(exeext)): Use link mutex.
2632
44d90fe1
PC
26332013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2634
2635 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2636 to simply use OPT_Wpointer_arith.
2637 (build_unary_op): Likewise.
2638
4e7d7b3d
JJ
26392013-04-03 Jakub Jelinek <jakub@redhat.com>
2640
2641 PR c/19449
2642 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2643 argument. If set, or it temporarily for parsing of the first
2644 argument into force_folding_builtin_constant_p.
2645 (c_parser_postfix_expression): Adjust callers.
2646
839b422f
RB
26472013-03-21 Richard Biener <rguenther@suse.de>
2648
2649 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2650 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2651
2ee028f1
MP
26522013-02-12 Marek Polacek <polacek@redhat.com>
2653
2654 PR c/44938
2655 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2656 origtypes to NULL.
2657
8824edff
JJ
26582013-01-24 Jakub Jelinek <jakub@redhat.com>
2659
2660 PR c/56078
2661 * c-typeck.c (set_nonincremental_init_from_string): If
2662 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2663 returned false.
2664 (process_init_element): Likewise.
2665
eadd3d0d
JJ
26662012-12-20 Jakub Jelinek <jakub@redhat.com>
2667
2668 PR c++/55619
2669 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2670 argument, don't call default_function_array_conversion
2671 nor c_fully_fold here.
2672 (c_parser_asm_statement): Adjust callers.
2673 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2674 and outputs here, and call default_function_array_conversion
2675 on inputs that don't need to be addressable.
2676
f8a93a2e
JJ
26772012-12-18 Jakub Jelinek <jakub@redhat.com>
2678
2679 PR c/39464
2680 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2681 warning require that both c_common_unsigned_type as well as
2682 c_common_signed_type is the same for both mvl and mvr types.
2683
9771b263
DN
26842012-11-16 Diego Novillo <dnovillo@google.com>
2685
2686 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2687
2688 * c-common.c: Use new vec API in vec.h.
2689 * c-common.h: Likewise.
2690 * c-gimplify.c: Likewise.
2691 * c-pragma.c: Likewise.
2692 * c-pretty-print.c: Likewise.
2693 * c-pretty-print.h: Likewise.
2694 * c-semantics.c: Likewise.
2695 * c-decl.c: Likewise.
2696 * c-parser.c: Likewise.
2697 * c-tree.h: Likewise.
2698 * c-typeck.c: Likewise.
2699
880661a4
JW
27002012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2701
2702 PR c++/54930
2703 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2704
077d1abe
MLI
27052012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2706
2707 PR c/53066
2708 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2709 shadows a function, unless the variable is a function or a
2710 pointer-to-function.
2711
3a785c97
JJ
27122012-10-12 Jakub Jelinek <jakub@redhat.com>
2713
2714 PR c/54381
2715 * c-parser.c (struct c_tree_loc_pair): Removed.
2716 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2717 add location_t * and tree * arguments, fill in array of 3
2718 sizeof_arg trees and corresponding locs.
2719 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2720 c_parser_expr_list callers.
2721 (c_parser_postfix_expression_after_primary): Likewise. Pass
2722 array of 3 sizeof_arg trees and locs (corresponding to first
2723 3 arguments) to sizeof_pointer_memaccess_warning.
2724
703c8606
LC
27252012-10-09 Lawrence Crowl <crowl@google.com>
2726
2727 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2728 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2729 hash table.
2730
5d9de0d0
PC
27312012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2732
2733 PR c++/54194
2734 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2735 call.
2736
a212e43f
MG
27372012-10-09 Marc Glisse <marc.glisse@inria.fr>
2738
2739 PR c++/54427
2740 * c-typeck.c: Include c-common.h.
2741 (enum stv_conv): Moved to c-common.h.
2742 (scalar_to_vector): Moved to c-common.c.
2743 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2744 * Make-lang.in: c-typeck.c depends on c-common.h.
2745
3b78de56
AC
27462012-10-04 Arnaud Charlet <charlet@adacore.com>
2747
2748 * c-decl.c (c_write_global_declarations): Fix handling of
2749 -fdump-ada-spec*.
2750
78c60e3d
SS
27512012-09-30 Sharad Singhai <singhai@google.com>
2752
2753 * c-decl.c (c_write_global_declarations): Use a different method
2754 to determine if the dump has ben initialized.
2755
9f33203d
JM
27562012-09-14 Joseph Myers <joseph@codesourcery.com>
2757
2758 PR c/54552
2759 * c-typeck.c (c_cast_expr): When casting to a type requiring
2760 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2761 c_fully_fold first.
2762
a27d595d
JM
27632012-09-14 Joseph Myers <joseph@codesourcery.com>
2764
2765 PR c/54103
2766 * c-typeck.c (build_unary_op): Pass original argument of
2767 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2768 any C_MAYBE_CONST_EXPR, if it has integer operands.
2769 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2770 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2771 to c_objc_common_truthvalue_conversion, then remove any
2772 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2773 c_objc_common_truthvalue_conversion not
2774 c_common_truthvalue_conversion.
2775 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2776 call note_integer_operands for arguments with integer operands
2777 that are not integer constants.
2778
9feb29df
JJ
27792012-09-13 Jakub Jelinek <jakub@redhat.com>
2780
2781 PR c/54559
2782 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2783 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2784
d409320c
JJ
27852012-08-31 Jakub Jelinek <jakub@redhat.com>
2786
2787 PR c/54428
2788 * c-convert.c (convert): Don't call fold_convert_loc if
2789 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2790 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2791 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2792
6265d07c
JJ
27932012-08-24 Jakub Jelinek <jakub@redhat.com>
2794
2795 PR c/54355
2796 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2797 for nested and empty_ok arguments in the call to
2798 c_parser_declaration_or_fndef.
2799
1a4049e7
JJ
28002012-08-17 Jakub Jelinek <jakub@redhat.com>
2801
2802 * c-tree.h (c_last_sizeof_arg): Declare.
2803 * c-parser.c (struct c_tree_loc_pair): New type.
2804 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2805 non-NULL.
2806 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2807 (c_parser_postfix_expression_after_primary): Likewise. Call
2808 sizeof_pointer_memaccess_warning if needed.
2809 (sizeof_ptr_memacc_comptypes): New function.
2810 * c-typeck.c (c_last_sizeof_arg): New global variable.
2811 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2812
0229aee9
UB
28132012-07-24 Uros Bizjak <ubizjak@gmail.com>
2814
2815 * c-lang.h (lang_decl): Add variable_size GTY option.
2816
7ee2468b
SB
28172012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2818
2819 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2820 * Make-lang.in: Fix dependencies.
2821
d4a10d0a
SB
28222012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2823
2824 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2825 and add language Makefile hooks.
2826 * config-lang.in: New file.
2827 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2828 add the required "normal" config-lang.in rules.
2829 * c-lang.h: Moved from gcc/ to here.
2830 * c-tree.h: Likewise.
2831 * c-objc-common.c: Likewise.
2832 * c-objc-common.h: Likewise.
2833 * c-typeck.c: Likewise.
2834 * c-convert.c: Likewise.
2835 * c-lang.c: Likewise.
2836 * c-aux-info.c: Likewise.
2837 * c-errors.c: Likewise.
2838 * gccspec.c: Likewise.
2839 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2840 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2841\f
5624e564 2842Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2843
2844Copying and distribution of this file, with or without modification,
2845are permitted in any medium without royalty provided the copyright
2846notice and this notice are preserved.